Antw: Re: Attr-Rewrite and Users File

Anja Ruckdaeschel Anja.Ruckdaeschel at rz.uni-regensburg.de
Fri Oct 2 19:33:23 CEST 2009


Now I did it with unlang in the authorize section before the files module....

 if (Acct-Session-Id) {
        if (Acct-Session-Id =~  /^[^\(]+([\(])([^\)]+).+$/ ) {
               
                update request {
                ldapgroups1-Ldap-Group := "cn=%{2},ou=vpn,ou=test,o=test,c=de"
 
                }
                 update request  {
                ldapgroups2-Ldap-Group :=
"cn=%{2},ou=vpn,ou=test,o=test,c=de"
                }

       }
       }

and in the users file now:

 DEFAULT User-Name =~ "^(\.*)([a-zA-Z]{3}[0-9]{5})", Huntgroup-Name == "test",
 ldapgroups1-Ldap-Group=="%{ldapgroups1-Ldap-Group}"

Same result. Stripping works. But expansion of %{ldapgroups1-Ldap-Group}
happens only the first time after starting the server...
On the second request it´s again the value of the first one.

Any idea? Or did you mean something else???

Thanks for your help.

Anja







>>> "Ivan Kalik" <tnt at kalik.net> 01.10.2009 00:21 >>>
> DEFAULT User-Name =~ "^(\.*)([a-zA-Z]{3}[0-9]{5})", Huntgroup-Name ==
> "test",
> ldapgroups1-Ldap-Group=="cn=%{Acct-Session-Id},o=test,c=de"

Use unlang instead.

Ivan Kalik
Kalik Informatika ISP

-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list