Hi,

i am using freeradius 0.8.1 with Redhat 8.0, i wanted to use mysql authentication, the problem is that i want to authenticate users depending on Calling-Station-Id, so i added an entry (blank username) into the table radcheck with Auth-Type=Accept and added another attribute Calling-Station-Id=123456, and tried to autenticate that user using NTRadPing and Radius in debugging mode

-i got the following error message that the user-name can't be blank:
------------------------------------------------------------------
rlm_sql (sql): zero length username not permitted
modcall[authorize]: module "sql" returns invalid
modcall: group authorize returns invalid
------------------------------------------------------------------

-so i edited _src/modules/rlm_sql/rlm_sql.c_ an commented out the following lines so not to check for a zero username, _lines: 468-472_
-------------------------------------------------------------------------
465: /*
466: *They MUST have a username to do SQL authorization.
467: */
468: //if ((request->username == NULL) ||
469: //(request->username->length == 0)) {
470: //radlog(L_ERR, "rlm_sql (%s): zero length username not permitted\n", inst->config->xlat_name);
471: //return RLM_MODULE_INVALID;
472: //}
------------------------------------------------------------------------

-the error message changed :
-----------------------------------------------------------------------
radius_xlat: ''
modcall[authorize]: module "sql" returns fail
modcall: group authorize returns fail
-----------------------------------------------------------------------

so i edited it once again and commented out lines: 483,484
------------------------------------------------------------------------------
483: // if (sql_set_user(inst, request, sqlusername, NULL) *<* 0)
484: // return RLM_MODULE_INVALID
--------------------------------------------------------------------------------

this seemd to be working correctly, everything else seems to be working too

could somebody correct me if this contains mistakes??

is it also please possible to add this as an option to the source code of freeradius, cause i always upgrade to the lates version of freeradius and don't want to edit the code everytime on a working environment

Thanks for your help
Best Regards
Ossama Suleiman


- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to