rlm_sql - Different table for User authentication

rsg ranil.santhish at gmail.com
Thu Apr 17 16:50:17 CEST 2008


Hi,

I need to use a different auth table for Username/Password check.


Here are the modifications I made into config.

#raddb/sql.conf

:
  authcheck_table = "authcheck"
:
.

#raddb/sql/mysql/dialup.conf
:
.
## +++++++++ Here i retain the order of return data but omit some
Attributes (2. Attr Name and 4.Attr Operation as described in
Authorization Queries) +++++

       authorize_check_query = "SELECT id, userid, passwd \
          FROM ${authcheck_table} \
          WHERE userid = '%{SQL-User-Name}' \
          ORDER BY id"


## +++++++++++++I DID NOT TOUCH THE REPLY QUERY
++++++++++++++++++++++++++++++++++++++

        authorize_reply_query = "SELECT id, username, attribute, value, op \
          FROM ${authreply_table} \
          WHERE username = '%{SQL-User-Name}' \
          ORDER BY id"
:
.

When I tried to authenticate a user I get a segmentation fault as follows;

------
rlm_sql (sql): sql_set_user escaped user --> 'test'
rlm_sql (sql): Reserving sql socket id: 2
   expand: SELECT id, userid , password  FROM authcheck  WHERE userid
= '%{SQL-User-Name}'  ORDER BY id
-> SELECT id, userid, password  FROM authcheck  WHERE login = 'test' ORDER BY id

Segmentation fault
------

Are there any particular parameters/settings that i've missed here?


Thanks for the suggestions.

rg



More information about the Freeradius-Users mailing list