sql authorize with password and mac
Alan DeKok
aland at deployingradius.com
Mon Apr 20 16:26:21 CEST 2015
On Apr 20, 2015, at 9:48 AM, Marcin <marcin at nicram.net> wrote:
> I've that config for query:
>
> #v+
> authorize_check_query = "SELECT \
> id, lower(name) as UserName , 'Cleartext-Password' as Attribute
> , passwd as Value, ':=' as op \
> FROM nodes \
> WHERE name = '%{User-Name}'\
> UNION \
> SELECT n.id, lower(name) as UserName, 'Calling-Station-Id' as
> Attribute, upper(mac) as Value, ':=' as op FROM \
See http://wiki.freeradius.org/config/Operators
The ":=" operator has a well-defined meaning. You probably want "==" instead.
> callint station id from database doesn't contain proper mac, but
> authorization is accepted
Because you told it to do that. If you want a comparison, use the comparison operator.
Alan DeKok.
More information about the Freeradius-Users
mailing list