Hello, I'm working with freeradius 2.1.8 and I want to return an attribute when eexpiration module return 'userlock'. I try to add the item in expiration module: /etc/freeradius# cat modules-enabled/expiration # -*- text -*- # # $Id$ expiration { Reply-Message = "LA CUENTA HA EXPIRADO PARA %{%{Stripped-User-Name}:-%{User-Name}}" Codigo-Reject := Cuenta-Expirada } But it doesn't work. I also try using unlang in authorize section: authorize { . . . expiration if (userlock){ update reply { Codigo-Reject := Cuenta-Expirada } } pap } My debug info: rad_recv: Access-Request packet from host XXXX port 59252, id=177, length=71 User-Name = "prueba@temp.XXX.es" User-Password = "prueba" NAS-IP-Address = 127.0.1.1 NAS-Port = 0 server XXX { . . . [expiration] Checking Expiration time: '1 Jun 2010' [expiration] Account has expired [expiration] expand: Password Has Expired -> Password Has Expired ++[expiration] returns userlock } Using Post-Auth-Type Reject +- entering group REJECT {...} . . . Sending Access-Reject of id 177 to 158.49.247.199 port 59252 Reply-Message = "Password Has Expired\r\n" Somebody can help me. Thak you and sorry for my english. ____________________ Ana Gallardo Gómez ____________________
Ana Gallardo wrote:
I'm working with freeradius 2.1.8 and I want to return an attribute when eexpiration module return 'userlock'.
I try to add the item in expiration module: .... expiration { Reply-Message = "LA CUENTA HA EXPIRADO PARA %{%{Stripped-User-Name}:-%{User-Name}}" Codigo-Reject := Cuenta-Expirada }
But it doesn't work.
Nothing in the documentation suggests that will work.
I also try using unlang in authorize section:
authorize {
. . .
expiration if (userlock){ update reply { Codigo-Reject := Cuenta-Expirada } } pap }
That will work, with one minor change. ...
++[expiration] returns userlock } Using Post-Auth-Type Reject
Yes. Once the module returns "reject" or "userlock", the server stops processing the section and returns. The solution is: expiration { userlock = 1 } if (userlock) { update reply { Codigo-Reject := Curenta-Expirada } } This is documented in doc/configurable_failover, and to a lesser extent in "man unlang". Alan DeKok.
Thanks a lot.
Reply-Message = "LA CUENTA HA EXPIRADO PARA
%{%{Stripped-User-Name}:-%{User-Name}}" Codigo-Reject := Cuenta-Expirada }
But it doesn't work.
Nothing in the documentation suggests that will work.
Sometimes I don't know where can I found what I'm looking for, so I try different things :)
Yes. Once the module returns "reject" or "userlock", the server stops processing the section and returns. The solution is:
expiration { userlock = 1 } if (userlock) { update reply { Codigo-Reject := Curenta-Expirada } }
This is documented in doc/configurable_failover, and to a lesser extent in "man unlang".
Thanks Alan, I love Freeradius and your answers :D ____________________ Ana Gallardo Gómez ____________________
participants (2)
-
Alan DeKok -
Ana Gallardo