Customization of RADIUS reply
Fajar A. Nugraha
list at fajar.net
Tue Sep 18 09:56:52 CEST 2012
On Tue, Sep 18, 2012 at 2:44 PM, Václav Pernica <vpl at email.cz> wrote:
> One more question. Is there some easy way, how to use different SQL queries (authorize_check_query, authorize_reply_query) depending on the user name prefix or suffix.
>
> E.g.:
> user_name at domain1 -> use SQL queries 1
> user_name at domain2 -> use SQL queries 2
If the variant is limited, unlang might be useful. e.g. (untested):
authorize {
if (%{User-Name} == "user_name at domain1") {
sql1
}
elsif (%{User-Name} == "user_name at domain2") {
sql2
}
...
}
see "man unlang" for details. Depending on what you need and how you
configure your system, you might also be able to use Realm instead of
User-Name, or use regex for comparison.
--
Fajar
More information about the Freeradius-Users
mailing list