Checking NAS-Identifier in the radgroupcheck table

tnt at kalik.net tnt at kalik.net
Thu Oct 2 12:31:08 CEST 2008


Something is wrong here:

>rlm_sql (sql): Reserving sql socket id: 2
>        expand: SELECT id, username, attribute, value, op           FROM
>radcheck           WHERE username = '%{SQL-User-Name}'           ORDER BY id
>-> SELECT id, username, attribute, value, op           FROM radcheck
>WHERE username = 'user1'           ORDER BY id
>rlm_sql (sql): User found in radcheck table
>        expand: SELECT id, username, attribute, value, op           FROM
>radreply           WHERE username = '%{SQL-User-Name}'           ORDER BY id
>-> SELECT id, username, attribute, value, op           FROM radreply
>WHERE username = 'user1'           ORDER BY id
>        expand: SELECT groupname           FROM radusergroup           WHERE
>username = '%{SQL-User-Name}'           ORDER BY priority -> SELECT
>groupname           FROM radusergroup           WHERE username = 'user1'
>ORDER BY priority
>        expand: SELECT id, groupname, attribute,           Value, op
>FROM radgroupcheck           WHERE groupname = '%{Sql-Group}'
>ORDER BY id -> SELECT id, groupname, attribute,           Value, op
>FROM radgroupcheck           WHERE groupname = 'hotel1'           ORDER BY
>id
>rlm_sql (sql): Released sql socket id: 2
>++[sql] returns ok

This is the debug from my 2.0.5 test server:

rlm_sql (sql): Reserving sql socket id: 3
        expand: SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = '%{SQL-User-Name}'           ORDER
BY id -> SELECT id, username, attribute, value, op           FROM
radcheck           WHERE username = 'wifi'           ORDER BY id
rlm_sql_mysql: query:  SELECT id, username, attribute, value, op         
 FROM radcheck           WHERE username = 'wifi'           ORDER BY id
rlm_sql (sql): User found in radcheck table
        expand: SELECT id, username, attribute, value, op           FROM
radreply           WHERE username = '%{SQL-User-Name}'           ORDER
BY id -> SELECT id, username, attribute, value, op           FROM
radreply           WHERE username = 'wifi'           ORDER BY id
rlm_sql_mysql: query:  SELECT id, username, attribute, value, op         
 FROM radreply           WHERE username = 'wifi'           ORDER BY id
        expand: SELECT groupname           FROM usergroup           WHERE
username = '%{SQL-User-Name}'           ORDER BY priority -> SELECT
groupname           FROM usergroup           WHERE username = 'wifi'  
        ORDER BY priority
rlm_sql_mysql: query:  SELECT groupname           FROM usergroup         
 WHERE username = 'wifi'           ORDER BY priority
        expand: SELECT id, groupname, attribute,           Value, op     
     FROM radgroupcheck           WHERE groupname = '%{Sql-Group}'    
      ORDER BY id -> SELECT id, groupname, attribute,           Value,
op           FROM radgroupcheck           WHERE groupname = 'hs256'   
       ORDER BY id
rlm_sql_mysql: query:  SELECT id, groupname, attribute,           Value,
op           FROM radgroupcheck           WHERE groupname = 'hs256'   
       ORDER BY id
rlm_sql (sql): User found in group hs256
        expand: SELECT id, groupname, attribute,           value, op     
     FROM radgroupreply           WHERE groupname = '%{Sql-Group}'    
      ORDER BY id -> SELECT id, groupname, attribute,           value,
op           FROM radgroupreply           WHERE groupname = 'hs256'   
       ORDER BY id
rlm_sql_mysql: query:  SELECT id, groupname, attribute,           value,
op           FROM radgroupreply           WHERE groupname = 'hs256'   
       ORDER BY id
rlm_sql (sql): Released sql socket id: 3
++[sql] returns ok

It has calls to rlm_sql_mysql and also reports: rlm_sql (sql): User found
in group hs256. There is no such stuff in your debug.

Have you copied sql.conf from an older version? And not used sql.conf and
dialup.conf.


>Another thing, I didn't really understood the first part of your answer:
>
>
>> Not only that but Auth-Type Local also wasn't forced. Adding it there is
>> a mistake in the first place but it still didn't work.
>>
>
>Could you explain me this please?

Don't force Auth-Type. It's mentioned in numerous places in
documentation, website and this list. Let server sort it out.

That entry would have diverted the server from doing chap. Good thing it
didn't work.

Ivan Kalik
Kalik Informatika ISP




More information about the Freeradius-Users mailing list