Andrew Browning,
Hi!
Much appreciate of your answer.

you said "if you want to use mysql, then configure the mysql module".
I've configured the mysql module in radiusd.conf like this,
*authorize {
preprocess
chap
mschap
suffix
sql
}
accounting {
…
sql
…
}*
Is there any aditional points?

I add the users into the mysql as:
"insert into radgroupreply (groupname,attribute,op,value) values 
(‘user’,‘Auth-Type’,’:=’,’Local’);
insert into radgroupreply (groupname,attribute,op,value) values 
(‘user’,‘Service-Type’,’:=’,’Framed-User’);
insert into radgroupreply (groupname,attribute,op,value) values 
(‘user’,‘Framed-IP-Address’,’:=’,’255.255.255.254’);
insert into radgroupreply (groupname,attribute,op,value) values 
(‘user’,‘Framed-IP-Netmask’,’:=’,’255.255.255.0’);
insert into radcheck (username,attribute,op,value) values 
(‘jedliu’,’User-Password’,’:=’,’jedliu’);
insert into usergroup (username,groupname) values (‘jedliu’,’user’);
"
When i authenticate the user,
I found the mes like:
"
...
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 
acct_unique: key = "User-Name, Acct-Session-Id, NAS-IP-Address, 
Client-IP-Address, NAS-Port"
...

Processing the authorize section of radiusd.conf
modcall: entering group authorize for request 1
modcall[authorize]: module "preprocess" returns ok for request 1
modcall[authorize]: module "chap" returns noop for request 1
modcall[authorize]: module "mschap" returns noop for request 1
rlm_realm: No '@' in User-Name = "jedliu", looking up realm NULL
rlm_realm: No such realm "NULL"
modcall[authorize]: module "suffix" returns noop for request 1
rlm_eap: No EAP-Message, not doing EAP
modcall[authorize]: module "eap" returns noop for request 1
users: Matched entry DEFAULT at line 165
modcall[authorize]: module "files" returns ok for request 1
radius_xlat:  'jedliu'
rlm_sql (sql): sql_set_user escaped user --> 'jedliu'
radius_xlat:  'SELECT id, UserName, Attribute, Value, op           FROM 
radcheck           WHERE Username = 'jedliu'           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 = 'jedliu' AND 
usergroup.GroupName = radgroupcheck.GroupName ORDER BY radgroupcheck.id'
radius_xlat:  'SELECT id, UserName, Attribute, Value, op           FROM 
radreply           WHERE Username = 'jedliu'           ORDER BY id'
radius_xlat:  'SELECT 
radgroupreply.id,radgroupreply.GroupName,radgroupreply.Attribute,radgroupreply.Value,radgroupreply.op
  FROM radgroupreply,usergroup WHERE usergroup.Username = 'jedliu' 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 1
modcall: group authorize returns ok for request 1
rad_check_password:  Found Auth-Type System
auth: type "System"
Processing the authenticate section of radiusd.conf

**************
modcall: entering group authenticate for request 1
modcall[authenticate]: module "unix" returns notfound for request 1
modcall: group authenticate returns notfound for request 1
auth: Failed to validate the user.
**************
...
"

So that's the problem is,i can't authenticate the user.
Appreciate everyone's help.
Thx.
        

=======* 2006-03-08 Re: [Freeradius-Users]modcall[authenticate]: module "unix" 
returns notfound for request *=======

>the unix module searched for users in /etc/passwd (or whatever file
>you tell it to search). this has nothing to do with mysql. if you want
>to use the unix module, then make sure the user exists in /etc/passwd
>and that freeradius has read ability to that file. if you want to use
>mysql, then configure the mysql module.
>
>On 3/7/06, Jedliu <[EMAIL PROTECTED]> wrote:
>> Hi,
>> All!
>>
>> When I wanna run freeradius with the support of MySQL,
>> I found such mes * modcall[authenticate]: module "unix" returns notfound for 
>> request 12
>> modcall: group authenticate returns notfound for request 12
>> * in "radiusd -X" mode,but the user in USERS file can be authenticated 
>> successfully.
>> I've googled,but not find the solution.
>> And i've searched from the mailing list,though there're some troubleshooting 
>> too,no way to solove.
>> So pls help!
>>
>> Thx in advance!
>> Regards for everyone.

>> jedliu
>> [EMAIL PROTECTED]
>> 2006-03-06
>>
>> -
>> List info/subscribe/unsubscribe? See 
>> http://www.freeradius.org/list/users.html
>>

= = = = = = = = = = = = = = = = = = = =
                

        
 
                                 
             Jedliu
          2006-03-08

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

Reply via email to