Dlink + freeradius + Mysql gives me lots of problem
Hi, I have a problem in my configuration using the mixed of Dlink + freeradius + Mysql. What i am trying to do is for my dlink hotspot to authenticate using freeradius with mysql module. I do some testing using radtest on both localhost and remote host and my freeradius seems to authenticate and is working fine. Below is the output of Radiusd -x: Starting - reading configuration files ... Using deprecated naslist file. Support for this will go away soon. Module: Loaded exec rlm_exec: Wait=yes but no output defined. Did you mean output=none? Module: Instantiated exec (exec) Module: Loaded expr Module: Instantiated expr (expr) Module: Loaded PAP Module: Instantiated pap (pap) Module: Loaded CHAP Module: Instantiated chap (chap) Module: Loaded MS-CHAP Module: Instantiated mschap (mschap) Module: Loaded eap rlm_eap: Loaded and initialized type md5 rlm_eap: Loaded and initialized type leap rlm_eap: Loaded and initialized type gtc rlm_eap: Loaded and initialized type mschapv2 Module: Instantiated eap (eap) Module: Loaded System Module: Instantiated unix (unix) radiusd.conf Auth-Type eap already configured - skipping Module: Loaded preprocess Module: Instantiated preprocess (preprocess) Module: Loaded realm Module: Instantiated realm (suffix) Module: Loaded files Module: Instantiated files (files) Module: Loaded SQL rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked rlm_sql (sql): Attempting to connect to radius@192.168.1.229:/radius rlm_sql (sql): starting 0 rlm_sql (sql): Attempting to connect rlm_sql_mysql #0 rlm_sql_mysql: Starting connect to MySQL server for #0 rlm_sql (sql): Connected new DB handle, #0 rlm_sql (sql): starting 1 rlm_sql (sql): Attempting to connect rlm_sql_mysql #1 rlm_sql_mysql: Starting connect to MySQL server for #1 rlm_sql (sql): Connected new DB handle, #1 rlm_sql (sql): starting 2 rlm_sql (sql): Attempting to connect rlm_sql_mysql #2 rlm_sql_mysql: Starting connect to MySQL server for #2 rlm_sql (sql): Connected new DB handle, #2 rlm_sql (sql): starting 3 rlm_sql (sql): Attempting to connect rlm_sql_mysql #3 rlm_sql_mysql: Starting connect to MySQL server for #3 rlm_sql (sql): Connected new DB handle, #3 rlm_sql (sql): starting 4 rlm_sql (sql): Attempting to connect rlm_sql_mysql #4 rlm_sql_mysql: Starting connect to MySQL server for #4 rlm_sql (sql): Connected new DB handle, #4 Module: Instantiated sql (sql) Module: Loaded Acct-Unique-Session-Id Module: Instantiated acct_unique (acct_unique) Module: Loaded detail Module: Instantiated detail (detail) Module: Loaded radutmp Module: Instantiated radutmp (radutmp) Initializing the thread pool... Listening on authentication *:1645 Listening on accounting *:1646 Ready to process requests. OUTPUT of RADTEST FROM REMOTE: rad_recv: Access-Request packet from host 192.168.1.13:56435, id=70, length=60 User-Name = "benjtest" User-Password = "benjtest" NAS-IP-Address = 255.255.255.255 NAS-Port = 1645 rlm_sql (sql): Reserving sql socket id: 4 rlm_sql (sql): Released sql socket id: 4 Sending Access-Accept of id 70 to 192.168.1.13 port 56435 Framed-IP-Address := 192.168.0.50 Framed-Protocol := PPP Service-Type := Framed-User Framed-Compression := Van-Jacobson-TCP-IP OUTPUT when I try to Connect on wifi tru DLINK: rad_recv: Access-Request packet from host 192.168.1.22:65461, id=45, length=81 User-Name = "benjtest" Framed-MTU = 1400 NAS-Port-Type = Wireless-802.11 EAP-Message = 0x0201000d0162656e6a74657374 NAS-IP-Address = 192.168.1.22 Message-Authenticator = 0x6080434b26128348f34dc763d6c89192 rlm_sql (sql): Reserving sql socket id: 4 rlm_sql (sql): Released sql socket id: 4 Sending Access-Reject of id 45 to 192.168.1.22 port 65461 My question is why is it that when i use my DLINK wireless access point it failed to authenticate. I use exactly the same login account and password when i use radtest . Anybody please help me. Thank You. -- Mike Calizo Registered Linux User # 365113 _________________________________________________ Even the longest journey has to start with a small first-step
"Michael Calizo" <mike.calizo@gmail.com> wrote:
Radiusd -x:
Please use "radiusd -X", as suggested in the FAQ, README, INSTALL, and daily on this list.
OUTPUT when I try to Connect on wifi tru DLINK:
rad_recv: Access-Request packet from host 192.168.1.22:65461, id=3D45, length=3D81 User-Name =3D "benjtest" Framed-MTU =3D 1400 NAS-Port-Type =3D Wireless-802.11 EAP-Message =3D 0x0201000d0162656e6a74657374 NAS-IP-Address =3D 192.168.1.22 Message-Authenticator =3D 0x6080434b26128348f34dc763d6c89192 rlm_sql (sql): Reserving sql socket id: 4 rlm_sql (sql): Released sql socket id: 4 Sending Access-Reject of id 45 to 192.168.1.22 port 65461
You will get a lot more useful information with "radiusd -X". That's why we suggest using it. Alan DeKok.
Hi Alan, Below is the output of my radiusd -X Module: Instantiated radutmp (radutmp) Listening on authentication *:1645 Listening on accounting *:1646 Ready to process requests. rad_recv: Access-Request packet from host 192.168.1.22:65461, id=50, length=81 User-Name = "benjtest" Framed-MTU = 1400 NAS-Port-Type = Wireless-802.11 EAP-Message = 0x0201000d0162656e6a74657374 NAS-IP-Address = 192.168.1.22 Message-Authenticator = 0xb8d7da5020deaec51216a80996aa1c7f Processing the authorize section of radiusd.conf modcall: entering group authorize for request 0 modcall[authorize]: module "preprocess" returns ok for request 0 modcall[authorize]: module "chap" returns noop for request 0 modcall[authorize]: module "mschap" returns noop for request 0 rlm_realm: No '@' in User-Name = "benjtest", looking up realm NULL rlm_realm: No such realm "NULL" modcall[authorize]: module "suffix" returns noop for request 0 rlm_eap: EAP packet type response id 1 length 13 rlm_eap: No EAP Start, assuming it's an on-going EAP conversation modcall[authorize]: module "eap" returns updated for request 0 users: Matched entry DEFAULT at line 162 modcall[authorize]: module "files" returns ok for request 0 radius_xlat: 'benjtest' rlm_sql (sql): sql_set_user escaped user --> 'benjtest' radius_xlat: 'SELECT id, UserName, Attribute, Value, op FROM radcheck WHERE Username = 'benjtest' ORDER BY id' rlm_sql (sql): Reserving sql socket id: 4 radius_xlat: 'SELECT radgroupcheck.id,radgroupcheck.GroupName, radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op FROM radgroupcheck,usergroup WHERE usergroup.Username = 'benjtest' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id' radius_xlat: 'SELECT id, UserName, Attribute, Value, op FROM radreply WHERE Username = 'benjtest' ORDER BY id' radius_xlat: 'SELECT radgroupreply.id,radgroupreply.GroupName, radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE usergroup.Username = 'benjtest' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id' rlm_sql (sql): Released sql socket id: 4 modcall[authorize]: module "sql" returns ok for request 0 modcall: leaving group authorize (returns updated) for request 0 rad_check_password: Found Auth-Type Local auth: type Local auth: No User-Password or CHAP-Password attribute in the request auth: Failed to validate the user. Delaying request 0 for 1 seconds Finished request 0 Going to the next request --- Walking the entire request list --- Waking up in 1 seconds... --- Walking the entire request list --- Waking up in 1 seconds... --- Walking the entire request list --- Sending Access-Reject of id 50 to 192.168.1.22 port 65461 Waking up in 4 seconds... --- Walking the entire request list --- Cleaning up request 0 ID 50 with timestamp 440481b5 Nothing to do. Sleeping until we see a request. Thank You Again Mike Calizo Registered Linux User # 365113 _________________________________________________ Even the longest journey has to start with a small first-step
Hi,
modcall[authorize]: module "sql" returns ok for request 0 modcall: leaving group authorize (returns updated) for request 0 rad_check_password: Found Auth-Type Local auth: type Local auth: No User-Password or CHAP-Password attribute in the request auth: Failed to validate the user.
so, you're configured to use Local authentication....but dont have the passwords in the raddb/users file. but you want to use database...and I guess you have the password in plain or crypted form in the database? if so, just reconfigure the authenticate section of FreeRADIUS to use mysql alan
participants (3)
-
A.L.M.Buxey@lboro.ac.uk -
Alan DeKok -
Michael Calizo