Huntgroup-Name
Carsten Schulze
carsten.schulze at leuphana.de
Thu Feb 1 14:01:46 CET 2018
Hi
Am 01.02.2018 um 13:51 schrieb Alan DeKok:
> On Feb 1, 2018, at 7:28 AM, Carsten Schulze <carsten.schulze at leuphana.de> wrote:
>> I use the huntgroup text file for my NAS
>>
>> myshare NAS-IP-Address == 192.168.102.43
>>
>>
>> and now I would like to do a check in sites-enabled/default
>>
>> post-auth {
>> (0) if ("%{Huntgroup-Name}" == "myshare") {
> Read the debug output. ALL OF IT.
I did, thats all
>
> Does the input packet contain NAS-IP-Address?
No, i thought it is done by the huntgroup file over the == operator
>
> Is the "preprocess" module finding that match in the "huntgroups" file?
yes
# Loading module "preprocess" from file
/etc/freeradius/3.0/mods-enabled/preprocess
preprocess {
huntgroups =
"/etc/freeradius/3.0/mods-config/preprocess/huntgroups"
hints = "/etc/freeradius/3.0/mods-config/preprocess/hints"
>
> And the examples DON'T show using %{Huntgroup-Name} to get the name of the hunt group. They DO show using just the attribute reference:
Yes, but they define HuntGroup as local variable, or not? And the use
'%{NAS-IP-Address}' as well
<----
|update request { Huntgroup-Name := "%{sql:SELECT groupname FROM
radhuntgroup WHERE nasipaddress='%{NAS-IP-Address}'}" } ----> |
>
> if (Huntgroup-Name == "myshare") {
>
> I've never understood the need to put %{...} around every attribute name. Why? The documentation and examples don't do this.
I think you need it to access global variables?
>
>> How could I access/or is there a variable with the name of the huntgroup? There are only examples using sql :(.
> Follow the documentation. Read the debug output. That solves 99% of peoples problems.
There is no docu about huntgroups and the huntgroup file!
>
> Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
--
Mit freundlichen Grüßen
Dipl. Inform. (FH) Carsten Schulze
Medien- und Informationszentrum (MIZ)
Leuphana Universität Lüneburg
Universitätsallee 1, C7.217
21335 Lüneburg
Fon 04131.677-1241
Fax 04131.677-1246
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5565 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20180201/249d9831/attachment.bin>
More information about the Freeradius-Users
mailing list