hi,<br> I've tried changing SQL queries in sql.conf in order to read the username and password only from my customized table, but it doesn't work. It seems like I have to change the code in something like sql.c or rlm_sql.c, Please help.<br>
<br>Here is the output of the radius server after rejecting the user.<br><br>rad_recv: Access-Request packet from host <a href="http://127.0.0.1">127.0.0.1</a> port 32834, id=56, length=58<br> User-Name = "magnum"<br>
User-Password = "opus"<br> NAS-IP-Address = <a href="http://192.168.2.227">192.168.2.227</a><br> NAS-Port = 0<br>+- entering group authorize<br>++[preprocess] returns ok<br>++[chap] returns noop<br>
++[mschap] returns noop<br> rlm_realm: No '@' in User-Name = "magnum", looking up realm NULL<br> rlm_realm: No such realm "NULL"<br>++[suffix] returns noop<br> rlm_eap: No EAP-Message, not doing EAP<br>
++[eap] returns noop<br>++[unix] returns notfound<br>++[files] returns noop<br> expand: %{User-Name} -> magnum<br>rlm_sql (sql): sql_set_user escaped user --> 'magnum'<br>rlm_sql (sql): Reserving sql socket id: 4<br>
expand: SELECT UserName,Value FROM radcheck WHERE Username = '%{SQL-User-Name}' -> SELECT UserName,Value FROM radcheck WHERE Username = 'magnum'<br>query: SELECT UserName,Value FROM radcheck WHERE Username = 'magnum'<br>
rlm_sql: The 'Attribute' field is empty or NULL, skipping the entire row.<br>rlm_sql (sql): Error getting data from database<br>rlm_sql (sql): SQL query error; rejecting user<br>rlm_sql (sql): Released sql socket id: 4<br>
++[sql] returns fail<br>Invalid user: [magnum/opus] (from client localhost port 0)<br> Found Post-Auth-Type Reject<br>+- entering group REJECT<br> expand: %{User-Name} -> magnum<br> attr_filter: Matched entry DEFAULT at line 11<br>
++[attr_filter.access_reject] returns updated<br>Delaying reject of request 0 for 1 seconds<br>Going to the next request<br>Waking up in 0.9 seconds.<br>Sending delayed reject for request 0<br>Sending Access-Reject of id 56 to <a href="http://127.0.0.1">127.0.0.1</a> port 32834<br>
Waking up in 4.9 seconds.<br>Cleaning up request 0 ID 56 with timestamp +14<br>Ready to process requests.<br>rad_recv: Access-Request packet from host <a href="http://127.0.0.1">127.0.0.1</a> port 32834, id=115, length=56<br>
User-Name = "john"<br> User-Password = "john"<br> NAS-IP-Address = <a href="http://192.168.2.227">192.168.2.227</a><br> NAS-Port = 0<br>+- entering group authorize<br>++[preprocess] returns ok<br>
++[chap] returns noop<br>++[mschap] returns noop<br> rlm_realm: No '@' in User-Name = "john", looking up realm NULL<br> rlm_realm: No such realm "NULL"<br>++[suffix] returns noop<br> rlm_eap: No EAP-Message, not doing EAP<br>
++[eap] returns noop<br>++[unix] returns notfound<br>++[files] returns noop<br> expand: %{User-Name} -> john<br>rlm_sql (sql): sql_set_user escaped user --> 'john'<br>rlm_sql (sql): Reserving sql socket id: 3<br>
expand: SELECT UserName,Value FROM radcheck WHERE Username = '%{SQL-User-Name}' -> SELECT UserName,Value FROM radcheck WHERE Username = 'john'<br>query: SELECT UserName,Value FROM radcheck WHERE Username = 'john'<br>
rlm_sql: The 'Attribute' field is empty or NULL, skipping the entire row.<br>rlm_sql (sql): Error getting data from database<br>rlm_sql (sql): SQL query error; rejecting user<br>rlm_sql (sql): Released sql socket id: 3<br>
++[sql] returns fail<br>Invalid user: [john/john] (from client localhost port 0)<br> Found Post-Auth-Type Reject<br>+- entering group REJECT<br> expand: %{User-Name} -> john<br> attr_filter: Matched entry DEFAULT at line 11<br>
++[attr_filter.access_reject] returns updated<br>Delaying reject of request 1 for 1 seconds<br>Going to the next request<br>Waking up in 0.9 seconds.<br>Sending delayed reject for request 1<br>Sending Access-Reject of id 115 to <a href="http://127.0.0.1">127.0.0.1</a> port 32834<br>
Waking up in 4.9 seconds.<br>Cleaning up request 1 ID 115 with timestamp +23<br>Ready to process requests.<br><br><br><br>With Regards<br>Elangbam Johnson<br>