variable expansion of check item in users file
Hello, I have several accounts stored in users files for which i have set set the Pool-Name controll attribute based on the Huntgoup-Name. So i tried something like this: account1 Cleartext-Password := "passwd1", Pool-Name := "%{Huntgroup-Name}_suffix" Unfortunatly the expansion of the variable doesn't happen and all i get is '=25=7BHuntgroup-Name=7D_suffix' If i put exactly the same thing in the reply item expansion is done correctly... account1 Cleartext-Password := "passwd1" IP-Address-Pool-Name := "%{Huntgroup-Name}_suffix" Is it a normal behaviour? How else can I achieve it (I would appreciate not to duplicate users entries for each of my huntgroup!)?
I have several accounts stored in users files for which i have set set the Pool-Name controll attribute based on the Huntgoup-Name. So i tried something like this:
account1 Cleartext-Password := "passwd1", Pool-Name := "%{Huntgroup-Name}_suffix"
Unfortunatly the expansion of the variable doesn't happen and all i get is '=25=7BHuntgroup-Name=7D_suffix' If i put exactly the same thing in the reply item expansion is done correctly...
account1 Cleartext-Password := "passwd1" IP-Address-Pool-Name := "%{Huntgroup-Name}_suffix"
Is it a normal behaviour? How else can I achieve it (I would appreciate not to duplicate users entries for each of my huntgroup!)? -
Unlang: update control { Pool-Name := whatever } Ivan Kalik Kalik Informatika ISP
Le 05.11.2008 13:40, tnt@kalik.net a écrit :
I have several accounts stored in users files for which i have set set the Pool-Name controll attribute based on the Huntgoup-Name. So i tried something like this:
account1 Cleartext-Password := "passwd1", Pool-Name := "%{Huntgroup-Name}_suffix"
Unfortunatly the expansion of the variable doesn't happen and all i get is '=25=7BHuntgroup-Name=7D_suffix' If i put exactly the same thing in the reply item expansion is done correctly...
account1 Cleartext-Password := "passwd1" IP-Address-Pool-Name := "%{Huntgroup-Name}_suffix"
Is it a normal behaviour? How else can I achieve it (I would appreciate not to duplicate users entries for each of my huntgroup!)? -
Unlang:
update control { Pool-Name := whatever }
I have to do it only for some of my users... and nothing really differs them from the others...
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Le 05.11.2008 14:32, tnt@kalik.net a écrit :
Unlang:
update control { Pool-Name := whatever }
I have to do it only for some of my users... and nothing really differs them from the others...
if (User-Name == "whatever") { update control { ...
Which would make me create more than 100 "if" (or a case) directives! This would work but *IS* more than painfull, and almost impossible to maintain! Aren't there any other alternative?
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Which would make me create more than 100 "if" (or a case) directives! This would work but *IS* more than painfull, and almost impossible to maintain!
More painfull than writing the same thing 100 times in users file??? Why would copy/paste (and editing the username) be less painfull in users file than elsewhere? Ivan Kalik Kalik Informatika ISP
Le 05.11.2008 14:55, tnt@kalik.net a écrit :
Which would make me create more than 100 "if" (or a case) directives! This would work but *IS* more than painfull, and almost impossible to maintain!
More painfull than writing the same thing 100 times in users file??? Why would copy/paste (and editing the username) be less painfull in users file than elsewhere?
Because of indentation, because it's part of server config and any syntax error could lead to an impossibility to start the server. I'm sure you can understand why i feel this is not an handy way to do things... My question is: Is it the only way?
Ivan Kalik Kalik Informatika ISP
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Alexandre Chapellon wrote:
I have several accounts stored in users files for which i have set set the Pool-Name controll attribute based on the Huntgoup-Name. So i tried something like this:
account1 Cleartext-Password := "passwd1", Pool-Name := "%{Huntgroup-Name}_suffix"
Unfortunatly the expansion of the variable doesn't happen and all i get is '=25=7BHuntgroup-Name=7D_suffix'
The expansion doesn't happen in the check items in the "users" file. Use "unlang". And "radiusd -C" will check if the configuration is valid. You can do this before restarting or HUPing the server. Alan DeKok.
participants (3)
-
Alan DeKok -
Alexandre Chapellon -
tnt@kalik.net