Hi - I've been reading through WiKi pages but still not clear. I need to evaluate two attributes and I'm doing this with the =~ operator. But the second attribute is not evaluated but instead returned as reg expr (exactly as stated below) DEFAULT *User-Name =~ "^([aA-zZ]+)-([aA-zZ]+)$", Auth-Type := Local, User-Password == "csetestp"* Alc-Subsc-ID-Str := "%{NAS-Port-Id}", Alc-Subsc-Prof-Str := "%{1}", Alc-SLA-Prof-Str := "%{2}", Alc-MSAP-Serv-Id := "100", Alc-MSAP-Policy := "msaps", *NAS-Port-Id =~ "^([^:]+):", * Alc-MSAP-Interface := "port-%{1}" Why is NAS-Port-ID returned, according to operators is should not be. I'm trying to evaluate NAS-Port attr and then based on the results assign a value to the last attribute: Alc-MSAP-Interface. If I put a DEFAULT keyword with credentials (Auth-Type, User-Pswd), infront of NAS-Port-Id, then, NAS-Port-Id and Alc-MSAP-Interfaces are not returned at all. What is the significance of this 'DEFAULT' keyword in the 'users' file? Thanks, Marlon
I put 'fall-through' before DEFAULT NAS-Port-Id.... and now it works. But I still do not understand what does the DEAFULT keyword do? Thanks, Marlon On Wed, Aug 5, 2009 at 3:51 PM, Marlon Duksa <mduksa@gmail.com> wrote:
Hi - I've been reading through WiKi pages but still not clear. I need to evaluate two attributes and I'm doing this with the =~ operator. But the second attribute is not evaluated but instead returned as reg expr (exactly as stated below)
DEFAULT *User-Name =~ "^([aA-zZ]+)-([aA-zZ]+)$", Auth-Type := Local, User-Password == "csetestp"* Alc-Subsc-ID-Str := "%{NAS-Port-Id}", Alc-Subsc-Prof-Str := "%{1}", Alc-SLA-Prof-Str := "%{2}", Alc-MSAP-Serv-Id := "100", Alc-MSAP-Policy := "msaps", *NAS-Port-Id =~ "^([^:]+):", * Alc-MSAP-Interface := "port-%{1}"
Why is NAS-Port-ID returned, according to operators is should not be. I'm trying to evaluate NAS-Port attr and then based on the results assign a value to the last attribute: Alc-MSAP-Interface.
If I put a DEFAULT keyword with credentials (Auth-Type, User-Pswd), infront of NAS-Port-Id, then, NAS-Port-Id and Alc-MSAP-Interfaces are not returned at all.
What is the significance of this 'DEFAULT' keyword in the 'users' file? Thanks, Marlon
Marlon Duksa wrote:
I've been reading through WiKi pages but still not clear. I need to evaluate two attributes and I'm doing this with the =~ operator. But the second attribute is not evaluated but instead returned as reg expr (exactly as stated below)
DEFAULT *User-Name =~ "^([aA-zZ]+)-([aA-zZ]+)$", Auth-Type := Local, User-Password == "csetestp"*
Don't set Auth-Type := LOCAL. Delete that. Use "Cleartext-Password := ...", not "User-Password == ..."
What is the significance of this 'DEFAULT' keyword in the 'users' file?
$ man users This is documented. Alan DeKok.
Thanks. But how do you invoke 'man' for the users? If I type what you did above in Ubuntu, I get some other 'users' :NAME users - print the user names of users currently logged in to the current host when I do 'man freeradius' then I get the correct man pages for freeradius but very little said about the DEFAULT keyword. On Thu, Aug 6, 2009 at 2:01 AM, Alan DeKok <aland@deployingradius.com>wrote:
Marlon Duksa wrote:
I've been reading through WiKi pages but still not clear. I need to evaluate two attributes and I'm doing this with the =~ operator. But the second attribute is not evaluated but instead returned as reg expr (exactly as stated below)
DEFAULT *User-Name =~ "^([aA-zZ]+)-([aA-zZ]+)$", Auth-Type := Local, User-Password == "csetestp"*
Don't set Auth-Type := LOCAL. Delete that.
Use "Cleartext-Password := ...", not "User-Password == ..."
What is the significance of this 'DEFAULT' keyword in the 'users' file?
$ man users
This is documented.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Marlon Duksa wrote:
Thanks. But how do you invoke 'man' for the users? If I type what you did above in Ubuntu, I get some other 'users' : NAME users - print the user names of users currently logged in to the current host
OK... $ man 5 users Or, you could try reading the "users" file that you were editing. The format is documented in the comments at the start of the file.
when I do 'man freeradius' then I get the correct man pages for freeradius but very little said about the DEFAULT keyword.
Because you weren't reading the documentation I pointed you to. The "freeradius" page documents the server, not all of the configuration files. There are individual "man" pages for the configuration files. Alan DeKok.
ok, thanks. It is more clear now. Marlon On Thu, Aug 6, 2009 at 9:42 AM, Alan DeKok <aland@deployingradius.com>wrote:
Marlon Duksa wrote:
Thanks. But how do you invoke 'man' for the users? If I type what you did above in Ubuntu, I get some other 'users' : NAME users - print the user names of users currently logged in to the current host
OK...
$ man 5 users
Or, you could try reading the "users" file that you were editing. The format is documented in the comments at the start of the file.
when I do 'man freeradius' then I get the correct man pages for freeradius but very little said about the DEFAULT keyword.
Because you weren't reading the documentation I pointed you to.
The "freeradius" page documents the server, not all of the configuration files. There are individual "man" pages for the configuration files.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Alan DeKok -
Marlon Duksa