Reply-Message in postauth_query
Hasanen AL-Bana
hasanen at gmail.com
Fri Sep 26 19:52:31 CEST 2014
reply:Reply-Message always comes empty when incorrect username or
password used , turned out that I have to define custom Reply-Message
in Authorize section like this :
sql {
notfound = 1
reject = 2
}
if(notfound){
update reply {
Reply-Message := "Login Failed. Please check your Username
and Password"
}
ok = reject
}
if(reject){
update reply {
Reply-Message := "Login Failed. Please check your Username
and Password"
}
ok = reject
}
I will check unlang for more details, thanks.
On Fri, Sep 26, 2014 at 8:33 PM, Alan DeKok <aland at deployingradius.com> wrote:
> Hasanen AL-Bana wrote:
>> in the reply field , I always get either Access-Reject or
>> Access-Accept from reply:Packet-Type.
>> What other options I have for reply: other than Packet-Type ?
>
> Any other attribute. They're just strings. Put the attribute name in
> there, and it will work.
>
>> Is it
>> possible to reach the Reply-Message from within postauth_query ?
>
> Yes. To get the value of the Reply-Message from the reply, use:
>
> %{reply:Reply-Message}
>
> See "man unlang" for exhaustive documentation on this.
>
> Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list