Hi All!

I have a FreeRadius with MySql Backend. Users authenticate with user and 
password from Mysql. Everithing works fine, but I want to users authentucate 
user and pass + MAC address what I store in MySql table (eg:radcheck).
My question is: possible to make this trio ?

I try to modify sql.conf, but don't work... :(
sql.conf:
authorize_check_query = "SELECT id,UserName,Attribute,Value,op,callid FROM 
${authcheck_table} WHERE Username = '%{SQL-User-Name}' AND callid = 
'%{Calling-Station-Id}' ORDER BY id"

//-- Server console

rad_recv: Access-Request packet from host 10.0.0.100:2296, id=0, length=169
        User-Name = "myuser"
        NAS-IP-Address = 10.0.0.100
        Called-Station-Id = "0014bfcc7f8f"
        Calling-Station-Id = "0014a50ae338"
        NAS-Identifier = "0014bfcc7f8f"
        NAS-Port = 17
        Framed-MTU = 1400
        State = 0x369116a4a0579462fc1d07aeaa8daf3b
        NAS-Port-Type = Wireless-802.11
        EAP-Message = 
0x020800261900170301001bf06e498f40ea4d8a93036e8a03c57158849b98c09874bd79aec61f
        Message-Authenticator = 0xa2d9ed3f5729d700d8908ad4d97ccfbc
  Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 8
  modcall[authorize]: module "preprocess" returns ok for request 8
  modcall[authorize]: module "chap" returns noop for request 8
  modcall[authorize]: module "mschap" returns noop for request 8
    rlm_realm: No '@' in User-Name = "myuser", looking up realm NULL
    rlm_realm: No such realm "NULL"
  modcall[authorize]: module "suffix" returns noop for request 8
  rlm_eap: EAP packet type response id 8 length 38
  rlm_eap: No EAP Start, assuming it's an on-going EAP conversation
  modcall[authorize]: module "eap" returns updated for request 8
radius_xlat:  'myuser'
rlm_sql (sql): sql_set_user escaped user --> 'myuser'
radius_xlat:  'SELECT id,UserName,Attribute,Value,op,callid FROM radcheck WHERE 
Username = 'myuser' AND callid = '0014a50ae338' ORDER BY id'
rlm_sql (sql): Reserving sql socket id: 3
radius_xlat:  'SELECT 
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
  FROM radgroupcheck,usergroup WHERE usergroup.Username = 'myuser' AND 
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
radius_xlat:  'SELECT id,UserName,Attribute,Value,op FROM radreply WHERE 
Username = 'myuser' ORDER BY id'
radius_xlat:  'SELECT 
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
  FROM radgroupreply,usergroup WHERE usergroup.Username = 'myuser' AND 
usergroup.GroupName = radgroupreply.GroupName ORDER BY radgroupreply.id'
rlm_sql (sql): Released sql socket id: 3
  modcall[authorize]: module "sql" returns ok for request 8
modcall: group authorize returns updated for request 8
  rad_check_password:  Found Auth-Type EAP
auth: type "EAP"
  Processing the authenticate section of radiusd.conf
modcall: entering group authenticate for request 8
  rlm_eap: Request found, released from the list
  rlm_eap: EAP/peap
  rlm_eap: processing type peap
  rlm_eap_peap: Authenticate
  rlm_eap_tls: processing TLS
  eaptls_verify returned 7
  rlm_eap_tls: Done initial handshake
  eaptls_process returned 7
  rlm_eap_peap: EAPTLS_OK
  rlm_eap_peap: Session established.  Decoding tunneled attributes.
  rlm_eap_peap: Received EAP-TLV response.
  rlm_eap_peap: Tunneled data is valid.
  rlm_eap_peap:  Had sent TLV failure, rejecting.
 rlm_eap: Handler failed in EAP/peap
  rlm_eap: Failed in EAP select
  modcall[authenticate]: module "eap" returns invalid for request 8
modcall: group authenticate returns invalid for request 8
auth: Failed to validate the user.
Login incorrect: [myuser/<no User-Password attribute>] (from client home port 
17 cli 0014a50ae338)
Delaying request 8 for 1 seconds
Finished request 8
Going to the next request
Waking up in 6 seconds...

//--! Server console


Please help me to solve this problem.

Thanks,
Golyo


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

Reply via email to