Hello, How to add Reply-Message in freeradius? anyone advise me pls. For example : I would like to send "Your username or password is wrong" message to NAS if the someone to access to my freeradius via wrong password from that NAS Thanks,
On 5 Oct 2011, at 16:23, Dagia Dorjsuren wrote:
Hello,
How to add Reply-Message in freeradius? anyone advise me pls.
For example : I would like to send "Your username or password is wrong" message to NAS if the someone to access to my freeradius via wrong password from that NAS
raddb/sites-available/default post-auth { Post-Auth-Type REJECT { update reply { Reply-Message = "Your password is wrong, prepare to be eaten by flying monkeys." } } } Arran Cudbard-Bell a.cudbardb@freeradius.org Betelwiki, Betelwiki, Betelwiki.... http://wiki.freeradius.org/ !
Hi One more question. How about if user name is wrong? eg: send reply message "user name not found" Best Regards Gary ----- Original Message ----- From: Arran Cudbard-Bell To: Dagia Dorjsuren ; FreeRadius users mailing list Sent: Wednesday, October 05, 2011 10:34 PM Subject: Re: Reply-Message in freeradius On 5 Oct 2011, at 16:23, Dagia Dorjsuren wrote: Hello, How to add Reply-Message in freeradius? anyone advise me pls.For example : I would like to send "Your username or password is wrong" message to NAS if the someone to access to my freeradius via wrong password from that NASraddb/sites-available/default post-auth { Post-Auth-Type REJECT { update reply { Reply-Message = "Your password is wrong, prepare to be eaten by flying monkeys." } } } Arran Cudbard-Bell a.cudbardb@freeradius.org Betelwiki, Betelwiki, Betelwiki.... http://wiki.freeradius.org/ ! ------------------------------------------------------------------------------ - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On 6 Oct 2011, at 04:27, gary wrote:
Hi One more question. How about if user name is wrong? eg: send reply message "user name not found"
sql if(notfound){ update reply { Reply-Message = 'User-name not found' } } Arran Cudbard-Bell a.cudbardb@freeradius.org Betelwiki, Betelwiki, Betelwiki.... http://wiki.freeradius.org/ !
On Wed, Oct 5, 2011 at 9:23 PM, Dagia Dorjsuren <dagmid_d@yahoo.com> wrote:
Hello,
How to add Reply-Message in freeradius? anyone advise me pls.
post-auth { ... update reply { Reply-Message = "Your message here\r\n" } ... }
For example : I would like to send "Your username or password is wrong" message to NAS if the someone to access to my freeradius via wrong password from that NAS
That's tricky. Checking for reject is easy enough (see example in the default post-auth section). Checking WHY the rejection happens (e.g. account expire, wrong password) is not easy. One workaround is to add your reply-message only when no there is no previous message (which is what "=" does. See "man unlang"). -- Fajar
participants (4)
-
Arran Cudbard-Bell -
Dagia Dorjsuren -
Fajar A. Nugraha -
gary