I am trying to setup freeradius using EAP-PEAP using a mysql backend. I seem to have most of it working, but one small issue. I have freeradius 2.1.5. This is my radcheck table: mysql> select * from radcheck; +----+--------------+--------------------+----+---------+ | id | username | attribute | op | value | +----+--------------+--------------------+----+---------+ | 1 | MACH01\testuser | Cleartext-Password | := | mysecret | +----+--------------+--------------------+----+---------+ However in the (radiusd -X) I am seeing the following: rlm_sql (sql): Reserving sql socket id: 4 [sql] expand: SELECT id, username, attribute, value, op FROM radchec k WHERE username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'MACH01=5Ctestuser' ORDER BY id 'MACH01\testuser' is changed to 'MACH01=5Ctestuser' and thus FR does not find it. If I change username to 'MACH01=5Ctestuser' in the radcheck table it seems to work. Is there a way to change the way rlm_sql_mysql does its encoding? So I can leave it as 'MACH01\testuser'. To save bandwidth I posted the full (radiusd -X) log at www.ehoeve.com/radius-debug.log I can provide more info as needed. TIA -Eric -- -=-=-=-=-=-=-=-=-=-=-=- Eric Hoeve Email: eric-freerad@ehoeve.com
This is my radcheck table: mysql> select * from radcheck; +----+--------------+--------------------+----+---------+ | id | username | attribute | op | value | +----+--------------+--------------------+----+---------+ | 1 | MACH01\testuser | Cleartext-Password | := | mysecret | +----+--------------+--------------------+----+---------+
However in the (radiusd -X) I am seeing the following: rlm_sql (sql): Reserving sql socket id: 4 [sql] expand: SELECT id, username, attribute, value, op FROM radchec k WHERE username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'MACH01=5Ctestuser' ORDER BY id
'MACH01\testuser' is changed to 'MACH01=5Ctestuser' and thus FR does not find it.
'MACH01=5Ctestuser' is in the request. You are not using proper character for / when typing the request. Either your supplicant or your keyboard aren't doing utf-8. Ivan Kalik Kalik Informatika ISP
Alan DeKok said the following, On 4/29/2009 7:27 AM:
Eric Hoeve wrote:
Is there a way to change the way rlm_sql_mysql does its encoding? So I can leave it as 'MACH01\testuser'.
Yes. Read raddb/sql/mysql/dialup.conf, and look for 'safe_characters'.
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Yes, that did the trick. I changed safe_chars in dialup.conf from safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789.-_: /" to safe-characters = "@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789.-_: /\\" I just wanted to mention that my supplicant is WinXP SP3. Thanks -Eric -- -=-=-=-=-=-=-=-=-=-=-=- Eric Hoeve Email: eric-freerad@ehoeve.com
participants (3)
-
Alan DeKok -
Eric Hoeve -
Ivan Kalik