rlm_sql_mysql encoding issue

Eric Hoeve eric-freerad at ehoeve.com
Wed Apr 29 05:16:57 CEST 2009


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 at ehoeve.com




More information about the Freeradius-Users mailing list