GNU radius using an existing db

View: New views
5 Messages — Rating Filter:   Alert me  

GNU radius using an existing db

by Jordi Prats :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
I'm trying to use GNU radius with a existing MySQL database, in this
case is vpopmail's database

I'm using this parameters on sqlserver configuration file

# Query to select the password for the given user. Should return one string.
auth_query  select pw_clear_passwd as password from vpopmail where
CONCAT(pw_name,'@',pw_domain)='%u'

# This query returns groups the user belongs to
group_query        select pw_domain as user_group from vpopmail where
CONCAT(pw_name,'@',pw_domain)='%u'

But all I'm getting is this error:

Jul 21 14:55:19 [23608]: (Access-Request local 32
"jprats@..."): Login incorrect
[jprats@.../tatatata]

Should auth_query return some kind of hash instead of a plaintext
password? How could I know what's going wrong?

regards,
--
Jordi


_______________________________________________
Help-gnu-radius mailing list
Help-gnu-radius@...
http://lists.gnu.org/mailman/listinfo/help-gnu-radius

Re: GNU radius using an existing db

by Sergey Poznyakoff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jordi Prats <jordi.prats@...> ha escrit:

> Should auth_query return some kind of hash instead of a plaintext
> password? How could I know what's going wrong?

Hola Jordi,

Apologies for not being able to reply earlier.

Handling of the password depends on the setting of Auth-Type attribute
in your users file. If its value is "Local", the password is treated as
plaintext. If it is "Crypt-Local", it is treated as a DES or MD5 hash
(recognized automatically). It also has lots of other values. Please,
see

 http://www.gnu.org/software/radius/manual/html_node/Authentication.html

for more details.

Regards,
Sergey



_______________________________________________
Help-gnu-radius mailing list
Help-gnu-radius@...
http://lists.gnu.org/mailman/listinfo/help-gnu-radius

Re: GNU radius using an existing db

by Jordi Prats :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sergey,
Auth-Type shoudn't be SQL instead of "Local"?

My users file is the following:

DEFAULT Auth-Type = SQL,
                Simultaneous-Use = 1
        Service-Type = Framed-User,
                Framed-Protocol = PPP

I've tryed this two configurations without luck.

DEFAULT  Auth-Type = Local,
       Simultaneous-Use = 1,
       Password-Location = SQL,
       User-Password = plaintext


DEFAULT  Auth-Type = Local,
       Simultaneous-Use = 1,
       Password-Location = SQL,


I'm not understanding how to specify the type and location of the
database. Could you please help me?

Thank you!!!

Jordi


On Wed, Jul 29, 2009 at 10:11 AM, Sergey Poznyakoff<gray@...> wrote:

> Jordi Prats <jordi.prats@...> ha escrit:
>
>> Should auth_query return some kind of hash instead of a plaintext
>> password? How could I know what's going wrong?
>
> Hola Jordi,
>
> Apologies for not being able to reply earlier.
>
> Handling of the password depends on the setting of Auth-Type attribute
> in your users file. If its value is "Local", the password is treated as
> plaintext. If it is "Crypt-Local", it is treated as a DES or MD5 hash
> (recognized automatically). It also has lots of other values. Please,
> see
>
>  http://www.gnu.org/software/radius/manual/html_node/Authentication.html
>
> for more details.
>
> Regards,
> Sergey
>
>



--
Jordi


_______________________________________________
Help-gnu-radius mailing list
Help-gnu-radius@...
http://lists.gnu.org/mailman/listinfo/help-gnu-radius

Re: GNU radius using an existing db

by Sergey Poznyakoff-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jordi Prats <jordi.prats@...> ha escrit:

> Auth-Type shoudn't be SQL instead of "Local"?

It depends on your configuration. FWIW, when using "SQL", as in your
users file:

> DEFAULT Auth-Type = SQL,
>                 Simultaneous-Use = 1
>         Service-Type = Framed-User,
>                 Framed-Protocol = PPP

Radius treats the returned passwords as DES or MD5 hashes.

> I'm not understanding how to specify the type and location of the
> database. Could you please help me?

What exactly do you want to achieve? In what form passwords are kept
in your database?

Regards,
Sergey


_______________________________________________
Help-gnu-radius mailing list
Help-gnu-radius@...
http://lists.gnu.org/mailman/listinfo/help-gnu-radius

Re: GNU radius using an existing db

by Christian Schrader-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Jordi,

if I understand your problem correctly, you seem to wonder how to tell
radius where your db is located and what type of database you have. You
can find that in the file raddb/sqlserver. (full path may be
/etc/raddb/sqlserver, depending on your configuration). Documentation of
that can be found here:

http://www.gnu.org/software/radius/manual/radius.html#SEC141

Maybe that helps...

Regards,
Chris

Jordi Prats schrieb:

> Hi Sergey,
> Auth-Type shoudn't be SQL instead of "Local"?
>
> My users file is the following:
>
> DEFAULT Auth-Type = SQL,
>                 Simultaneous-Use = 1
>         Service-Type = Framed-User,
>                 Framed-Protocol = PPP
>
> I've tryed this two configurations without luck.
>
> DEFAULT  Auth-Type = Local,
>        Simultaneous-Use = 1,
>        Password-Location = SQL,
>        User-Password = plaintext
>
>
> DEFAULT  Auth-Type = Local,
>        Simultaneous-Use = 1,
>        Password-Location = SQL,
>
>
> I'm not understanding how to specify the type and location of the
> database. Could you please help me?
>
> Thank you!!!
> Jordi
>
>
> On Wed, Jul 29, 2009 at 10:11 AM, Sergey Poznyakoff<gray@...> wrote:
>  
>> Jordi Prats <jordi.prats@...> ha escrit:
>>
>>    
>>> Should auth_query return some kind of hash instead of a plaintext
>>> password? How could I know what's going wrong?
>>>      
>> Hola Jordi,
>>
>> Apologies for not being able to reply earlier.
>>
>> Handling of the password depends on the setting of Auth-Type attribute
>> in your users file. If its value is "Local", the password is treated as
>> plaintext. If it is "Crypt-Local", it is treated as a DES or MD5 hash
>> (recognized automatically). It also has lots of other values. Please,
>> see
>>
>>  http://www.gnu.org/software/radius/manual/html_node/Authentication.html
>>
>> for more details.
>>
>> Regards,
>> Sergey
>>
>>
>>    
>
>
>
>  



_______________________________________________
Help-gnu-radius mailing list
Help-gnu-radius@...
http://lists.gnu.org/mailman/listinfo/help-gnu-radius