|
i use freeradius + mysql.
anthentication always fails, but i don't know why. pls help me ,thanx. follow is debugging information: rad_recv: Access-Request packet from host 192.168.3.120:23355, id=184, length=90 User-Name = "shenwei" CHAP-Password = 0x5cfc40a0aa43189847d9cc9c1574afbd0b NAS-IP-Address = 192.168.3.120 NAS-Identifier = "OpenH323GK" NAS-Port-Type = Virtual Service-Type = Login-User CHAP-Challenge = 0x42417828 Framed-IP-Address = 192.168.3.120 Processing the authorize section of radiusd.conf modcall: entering group authorize for request 4 modcall[authorize]: module "preprocess" returns ok for request 4 rlm_chap: Setting 'Auth-Type := CHAP' modcall[authorize]: module "chap" returns ok for request 4 modcall[authorize]: module "mschap" returns noop for request 4 rlm_realm: No '@' in User-Name = "shenwei", looking up realm NULL rlm_realm: No such realm "NULL" modcall[authorize]: module "suffix" returns noop for request 4 rlm_eap: No EAP-Message, not doing EAP modcall[authorize]: module "eap" returns noop for request 4 users: Matched entry DEFAULT at line 152 modcall[authorize]: module "files" returns ok for request 4 radius_xlat: 'shenwei' rlm_sql (sql): sql_set_user escaped user --> 'shenwei' radius_xlat: 'SELECT id,UserName,Attribute,op Value FROM radcheck WHERE Username = 'shenwei' ORDER BY id' rlm_sql (sql): Reserving sql socket id: 0 rlm_sql: The 'op' field for attribute 'CHAP-Password = =' is NULL, or non-existent. -----------------? -------? rlm_sql: You MUST FIX THIS if you want the configuration to behave as you expect. -----------------? radius_xlat: 'SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = 'shenwei' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id' radius_xlat: 'SELECT id,UserName,Attribute,op Value FROM radreply WHERE Username = 'shenwei' ORDER BY id' radius_xlat: 'SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = 'shenwei' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id' rlm_sql (sql): No matching entry in the database for request from user [shenwei]rlm_sql (sql): Released sql socket id: 0 modcall[authorize]: module "sql" returns notfound for request 4 modcall: group authorize returns ok for request 4 rad_check_password: Found Auth-Type CHAP auth: type "CHAP" Processing the authenticate section of radiusd.conf modcall: entering group Auth-Type for request 4 rlm_chap: login attempt by "shenwei" with CHAP password rlm_chap: Could not find clear text password for user shenwei modcall[authenticate]: module "chap" returns invalid for request 4 modcall: group Auth-Type returns invalid for request 4 auth: Failed to validate the user. database table: mysql> select * from radcheck; +----+----------+---------------+----+---------+ | id | UserName | Attribute | op | Value | +----+----------+---------------+----+---------+ | 1 | shenwei | CHAP-Password | = | shenwei | +----+----------+---------------+----+---------+ shenwei |

