Title: RE: Problems with MySQL Auth-Type

I reloaded the default sql.conf and made the necessary changes, in my previous sql.conf I forgot I was commenting out a few queries therefore it wasn't properly querying my database. With the default query's this is what I get. Instead of taking in TestRad as a the groupname it takes it in as the user-name. I'm not sql expert but there are a few around the workplace, is this a problem with the query itself and the values just have to be toyed with?

The reason it says no password at the bottom is because I didn't want to specify a password in the users / clients.conf files. I was really hoping to figure out a way to have it authenticate through the radcheck / radgroupcheck tables to authenticate, however, as Alan and you have told me this isn't really possible. Was this possible in 0.4 or has it never been possible?

Ready to process requests.
Thread 5 waiting to be assigned a request
rad_recv: Access-Request packet from host 172.16.0.2:3241, id=101, length=102
Thread 1 assigned request 0
--- Walking the entire request list ---
Threads: total/active/spare threads = 5/1/4
Nothing to do.  Sleeping until we see a request.
Thread 1 handling request 0, (1 handled so far)
        User-Name = "TestRad"
        User-Password = "U\352\221\231A\026A\202\231\227aG\221\204\312\254"
        NAS-Port = 0
        Service-Type = Framed-User
        Framed-Protocol = PPP
        Tunnel-Client-Endpoint:0 = "63.188.96.2"
        Attr-201588758 = "\000\000\000\005"
        NAS-IP-Address = 172.16.0.2
        NAS-Port-Type = Virtual
modcall: entering group authorize
radius_xlat:  'TestRad'
sql_escape in:  'TestRad'
sql_escape out:  'TestRad'
sql_set_user:  escaped user --> 'TestRad'
radius_xlat:  'SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE STRCMP(Username, 'TestRad') = 0 ORDER BY id'
rlm_sql: Reserving sql socket id: 9
SELECT id,UserName,Attribute,Value,op FROM radcheck WHERE STRCMP(Username, 'TestRad') = 0 ORDER BY id
sql_escape in:  'DEFAULT'
sql_escape out:  'DEFAULT'
sql_set_user:  escaped user --> 'DEFAULT'
radius_xlat:  'SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op  FROM radgroupcheck,usergroup WHERE usergroup.Username = 'DEFAULT' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'

SELECT radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op  FROM radgroupcheck,usergroup WHERE usergroup.Username = 'DEFAULT' AND usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id

radius_xlat:  'SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op  FROM radgroupreply,usergroup WHERE usergroup.Username = 'DEFAULT' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'

SELECT radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op  FROM radgroupreply,usergroup WHERE usergroup.Username = 'DEFAULT' AND usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id

rlm_sql: User DEFAULT not found and DEFAULT not found
rlm_sql: Released sql socket id: 9
  modcall[authorize]: module "sql" returns notfound
rlm_counter: Entering module authorize code
rlm_counter: Could not find Check item value pair
  modcall[authorize]: module "counter" returns noop
    users: Matched DEFAULT at 148
  modcall[authorize]: module "files" returns ok
modcall: group authorize returns ok
  rad_check_password:  Found Auth-Type Local
auth: type Local
auth: No password configured for the user

Thanks,

Chris DeRamus
HQ VPN Administrator
Verizon
301-903-2093

Actually, after having another look i don't quite agree.

The lines:

Radius_xlat: ''
Rlm_sql Reserving sql socket id: 4
MYSQL Error: Cannot get result
MYSQL Error: Query was empty

From the first mail in the thread would indicate that, umm.. the query
was empty. The message 'Query was empty' is, not very suprisingly
exactly what libmysqlclient returns in mysql_error() for empty querys.
An empty query won't return much in the way of anything.

This looks like a messed up raddb/sql.conf , have you made any changes
to the querys in there?

Ofcourse, i could very well be way of :)

--
Simon


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

Reply via email to