help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnu-radius] problems user authentication through mysql database


From: Slava Grecea
Subject: [Help-gnu-radius] problems user authentication through mysql database
Date: Mon, 25 Feb 2002 11:11:37 +0200

Hi.
I've installed gnu-radius without problems.
Also I've made a database radius using scripts from /db directory of the 
distribution.
For testing purpose I did the folowing:

After reading the docs i understood that version  0.96 support plaintext 
password in SQL database. So I inserted in the passwd table one
user :

username        Framed-PPP      plainpassword   Y

and my users file contains the folowing

DEFAULT Auth-Type = Crypt-Local,
                Password-Location = SQL
                Service-Type = Framed-User,
                Framed-Protocol = PPP

In the attrib table also I inserted some attributes:

username        Framed-Protocol PPP     NULL
username        Service-Type    Framed-User     NULL
username        NAS-Port-Type   Async

Using this data I couldn't authenticate that user using SQL authentication, 
because log sais, that is using not SQL auth_type but crypt auth_type.
Why ?

Here is  a piece of my radius.debug log

Feb  22 15:03:06: [26723]: Auth.debug: mysql.c:276:rad_mysql_exec: query: 
SELECT attr,value,op FROM attrib WHERE user_name='Lrelsoft' AND op IS NOT NULL
Feb  22 15:03:06: [26723]: Auth.debug: mysql.c:82:do_mysql_query: called with 
SELECT attr,value,op FROM attrib WHERE user_name='Lrelsoft' AND op IS NOT NULL
Feb  22 15:03:06: [26723]: Auth.debug: mysql.c:104:do_mysql_query: MYSQL 
query returned 0
Feb  22 15:03:06: [26723]: Auth.debug: mysql.c:287:rad_mysql_exec: got 1 rows 
Feb  22 15:03:06: [26723]: Auth.debug: sql.c:1296:rad_sql_reply_attr_query: 
qid 1
Feb  22 15:03:06: [26723]: Auth.debug: sql.c:773:attach_sql_connection: 
attaching 0,1
Feb  22 15:03:06: [26723]: Auth.debug: sql.c:641:print_queue: Connection 
queue: 0x80df5d0 - 0x80df5d0, 1;0:
Feb  22 15:03:06: [26723]: Auth.debug: sql.c:645:print_queue: 0: 0x80df5d0 
(0) 1
Feb  22 15:03:06: [26723]: Auth.debug: mysql.c:276:rad_mysql_exec: query: 
SELECT attr,value FROM attrib WHERE user_name='Lrelsoft' AND op IS NULL
Feb  22  15:03:06: [26723]: Auth.debug: mysql.c:82:do_mysql_query: called 
with SELECT attr,value FROM attrib WHERE user_name='Lrelsoft' AND op IS NULL
Feb  22 15:03:06: [26723]: Auth.debug: mysql.c:104:do_mysql_query: MYSQL 
query returned 0
Feb  22  15:03:06: [26723]: Auth.debug: mysql.c:287:rad_mysql_exec: got 1 rows
Feb  22  15:03:06: [26723]: Auth.debug: files.c:343:user_find_sym: returning 1
Feb  22  15:03:06: [26723]: Auth.debug: sql.c:1167:rad_sql_pass: qid 1
Feb  22  15:03:06: [26723]: Auth.debug: sql.c:773:attach_sql_connection: 
attaching 0,1
Feb  22  15:03:06: [26723]: Auth.debug: sql.c:641:print_queue: Connection 
queue: 0x80df5d0 - 0x80df5d0, 1;0:
Feb  22  15:03:06: [26723]: Auth.debug: sql.c:645:print_queue: 0: 0x80df5d0 
(0) 1
Feb  22  15:03:06: [26723]: Auth.debug: mysql.c:236:rad_mysql_getpwd: query: 
SELECT password FROM passwd WHERE user_name='Lrelsoft' AND active='Y'
Feb  22 15:03:06: [26723]: Auth.debug: mysql.c:82:do_mysql_query: called with 
SELECT password FROM passwd WHERE user_name='Lrelsoft' AND active='Y'
Feb  22 15:03:06: [26723]: Auth.debug: mysql.c:104:do_mysql_query: MYSQL 
query returned 0
Feb  22 15:03:06: [26723]: Auth.error:  mysql password - PCMCI3co
Feb  22 15:03:06: [26723]: Auth.debug: auth.c:315:rad_check_password: 
auth_type=3, userpass=PCMCI3co, name=Lrelsoft, password=PCMCI3co
Feb  22  15:03:06: [26723]: Auth.debug: auth.c:343:rad_check_password:   
auth: Crypt
Feb  22 15:03:06: [26723]: Auth.debug: auth.c:965:sfn_validate: 1 -> 17
Feb  22  15:03:06: [26723]: Auth.debug: auth.c:995:sfn_validate: 17 -> 17
Feb  22  15:03:06: [26723]: Auth.notice: Login incorrect: 
[Lrelsoft/PCMCI3co]: CLID 2225717 (from nas tc2harc)
Feb  22  15:03:06: [26723]: Auth.debug: auth.c:1279:sfn_reject: REJECT: 
Lrelsoft

Using the local auth_type everything is OK, the user is authenticated.
In that case my users file looks like that :

Lrelsoft Password="PCMCI3co", Login-Limit=3, NAS-Port-Type=Async
    Service-Type = Framed-User, Framed-Protocol = PPP,
    Session-Timeout = 600, Idle-Timeout = 120

Please, point me the way to get radius to do what it is supposed to do.

Any help would be appreciated.

Thank you,
Slava



reply via email to

[Prev in Thread] Current Thread [Next in Thread]