freeradius and mysql - no matching entry in db
i have fedora core 4 and freeradius-1.0.5 and this is what i do... # radtest luqe mypassword localhost 1812 testing123 Sending Access-Request of id 24 to 127.0.0.1:1812 User-Name = "luqe" User-Password = "mypassword" NAS-IP-Address = dns.mammiri.net NAS-Port = 1812 rad_recv: Access-Reject packet from host 127.0.0.1:1812, id=24, length=20 * On radius log: radius_xlat: 'SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = 'luqe' ORDER BY id' rlm_sql (sql): Reserving sql socket id: 2 rlm_sql_mysql: query: SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = 'luqe' ORDER BY id radius_xlat: 'SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = 'luqe' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id' rlm_sql_mysql: query: SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = 'luqe' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id radius_xlat: 'SELECT id, UserName, Attribute, Value, op FROM radreply WHERE Username = 'luqe' ORDER BY id' rlm_sql_mysql: query: SELECT id, UserName, Attribute, Value, op FROM radreply WHERE Username = 'luqe' ORDER BY id radius_xlat: 'SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = 'luqe' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id' rlm_sql_mysql: query: SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = 'luqe' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id rlm_sql (sql): No matching entry in the database for request from user [luqe] rlm_sql (sql): Released sql socket id: 2 modcall[authorize]: module "sql" returns notfound for request 2 modcall: group authorize returns ok for request 2 auth: No authenticate method (Auth-Type) configuration found for the request: Rejecting the user auth: Failed to validate the user. No matching entry in the database for request from user [luqe] but if i'm quering manually on mysql: mysql> SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = 'luqe' ORDER BY id; +-----+----------+---------------+----------+----+ | id | UserName | Attribute | Value | op | +-----+----------+---------------+----------+----+ | 553 | luqe | User-Password | mypassword | == | +-----+----------+---------------+----------+----+ 1 row in set (0.00 sec) mysql> SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = 'luqe' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id; +----+-----------+------------------+-------+----+ | id | GroupName | Attribute | Value | op | +----+-----------+------------------+-------+----+ | 3 | dial-up | Auth-Type | Local | := | | 4 | dial-up | Simultaneous-Use | 1 | == | +----+-----------+------------------+-------+----+ 2 rows in set (0.00 sec) mysql> SELECT id, UserName, Attribute, Value, op FROM radreply WHERE Username = 'luqe' ORDER BY id; +-----+----------+-------------------+-------------+----+ | id | UserName | Attribute | Value | op | +-----+----------+-------------------+-------------+----+ | 553 | luqe | User-Password | mypassword | := | | 554 | luqe | Framed-IP-Address | 192.168.1.2 | := | | 558 | luqe | Simultaneous-Use | 2 | = | +-----+----------+-------------------+-------------+----+ 3 rows in set (0.00 sec) mysql> SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = 'luqe' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id; +----+-----------+--------------------+---------------------+----+ | id | GroupName | Attribute | Value | op | +----+-----------+--------------------+---------------------+----+ | 4 | dial-up | Service-Type | Framed-User | := | | 5 | dial-up | Framed-Protocol | PPP | := | | 7 | dial-up | Framed-Compression | Van-Jacobson-TCP-IP | := | +----+-----------+--------------------+---------------------+----+ 3 rows in set (0.02 sec)
Luqman H said:
No matching entry in the database for request from user [luqe] but if i'm quering manually on mysql: mysql> SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = 'luqe' ORDER BY id; +-----+----------+---------------+----------+----+ | id | UserName | Attribute | Value | op | +-----+----------+---------------+----------+----+ | 553 | luqe | User-Password | mypassword | == | +-----+----------+---------------+----------+----+ 1 row in set (0.00 sec) Try := in the op field and see if a match is found. -- Lewis Bergman Texas Communications 4309 Maple ST. Abilene, TX 79602 325-691-3301
How do I convert this to be used with freeradius????? I am migrating from vircom radius over to freeradius Vircom radius (VopRadius) Used a file called profiles.txt in it you could assign extra attributes to the login for a group by the key Profile="mailfilter" In their login attributes Anyway it searched the profiles.txt found mailfilter and assifgned the attributes to the login ie below is a clip of mailfilter from profiles.txt Profile="mailfilter" Ascend-Data-Filter="ip in forward tcp est" Ascend-Data-Filter="ip in forward dstip 68.22.89.5/32" Ascend-Data-Filter="ip in forward dstip 204.13.240.5/32" Ascend-Data-Filter="ip in forward dstip 65.174.134.5/32" Ascend-Data-Filter="ip in forward dstip 204.17.24.53/32" Ascend-Data-Filter="ip in forward dstip 216.29.249.1/32" Ascend-Data-Filter="ip in forward dstip 216.29.249.2/32" Ascend-Data-Filter="ip in forward dstip 216.29.249.3/32" Ascend-Data-Filter="ip in forward dstip 216.29.249.4/32" Ascend-Data-Filter="ip in forward dstip 63.110.140.0/24" Ascend-Data-Filter="ip in forward dstip 162.42.148.0/24" Ascend-Data-Filter="ip in forward dstip 162.42.195.0/24" Ascend-Data-Filter="ip in drop tcp dstport = 25" Ascend-Data-Filter="ip in forward"
2005/10/25, Lewis Bergman <lbergman@wtxs.net>:
mysql> SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = 'luqe' ORDER BY id; +-----+----------+---------------+----------+----+ | id | UserName | Attribute | Value | op | +-----+----------+---------------+----------+----+ | 553 | luqe | User-Password | mypassword | == | +-----+----------+---------------+----------+----+ 1 row in set (0.00 sec) Try := in the op field and see if a match is found.
i've try change the op field to := and still got this ... ------------------------------------- rlm_sql (sql): No matching entry in the database for request from user [luqe] rlm_sql (sql): Released sql socket id: 4 modcall[authorize]: module "sql" returns notfound for request 0 modcall: group authorize returns ok for request 0 auth: No authenticate method (Auth-Type) configuration found for the request: Rejecting the user auth: Failed to validate the user.
if i include the user file, ----------------- rlm_sql_mysql: query: SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = 'luqe' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id rlm_sql (sql): No matching entry in the database for request from user [luqe] rlm_sql (sql): Released sql socket id: 2 modcall[authorize]: module "sql" returns notfound for request 1 modcall: group authorize returns ok for request 1 rad_check_password: Found Auth-Type Local auth: type Local auth: user supplied User-Password matches local User-Password Login OK: [luqe] (from client dns port 1812) Sending Access-Accept of id 4 to 127.0.0.1:32810 Finished request 1 ---------------------- it successfully authenticate using 'user' file... but still fail with mysql.. with: No matching entry in the database ... so maybe the problem is in my data table that not correctly filled so here again i list my table data, please correct it to match the freeradius-1.0.5 requirement... ----------------- mysql> SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = 'luqe' ORDER BY id; +-----+----------+---------------+----------+----+ | id | UserName | Attribute | Value | op | +-----+----------+---------------+----------+----+ | 553 | luqe | User-Password | mypassword | := | +-----+----------+---------------+----------+----+ 1 row in set (0.00 sec) mysql> SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = 'luqe' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id; +----+-----------+------------------+-------+----+ | id | GroupName | Attribute | Value | op | +----+-----------+------------------+-------+----+ | 3 | dial-up | Auth-Type | Local | := | | 4 | dial-up | Simultaneous-Use | 1 | == | +----+-----------+------------------+-------+----+ 2 rows in set (0.00 sec) mysql> SELECT id, UserName, Attribute, Value, op FROM radreply WHERE Username = 'luqe' ORDER BY id; +-----+----------+-------------------+-------------+----+ | id | UserName | Attribute | Value | op | +-----+----------+-------------------+-------------+----+ | 553 | luqe | User-Password | mypassword | := | | 554 | luqe | Framed-IP-Address | 192.168.1.2 | := | | 558 | luqe | Simultaneous-Use | 2 | = | +-----+----------+-------------------+-------------+----+ 3 rows in set (0.00 sec) mysql> SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = 'luqe' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id; +----+-----------+--------------------+---------------------+----+ | id | GroupName | Attribute | Value | op | +----+-----------+--------------------+---------------------+----+ | 4 | dial-up | Service-Type | Framed-User | := | | 5 | dial-up | Framed-Protocol | PPP | := | | 7 | dial-up | Framed-Compression | Van-Jacobson-TCP-IP | := | +----+-----------+--------------------+---------------------+----+ 3 rows in set (0.02 sec)
participants (3)
-
Global Net, LLC -
Lewis Bergman -
Luqman H