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

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

Re: AW: [Help-gnu-radius] authentication problem


From: Sergey Poznyakoff
Subject: Re: AW: [Help-gnu-radius] authentication problem
Date: Wed, 18 Sep 2002 10:51:00 +0300

> how am i supposed to encrypt the passwords? I used the MD5() function of
> mysql - is that the way to go?

No, it is not. Use ENCRYPT() function instead. By default it generates
DES hashes (these should work too). When invoked with the proper
second argument, the function generates MD5 hashes, provided that the
underlying crypt() call supports them (refer to man crypt to see if it
does). For example, the following invocation may be used to generate
MD5 hashes:

ENCRYPT('guessme',concat('$1$',substring(unix_timestamp(now()),6,10),'$'))

(substitute actual plaintext password for 'guessme'). So, to insert a
new record into the pass table you may use:

INSERT into pass
(user_name,service,password)
VALUES ('user',
        'PPP',
        ENCRYPT('guessme',
                concat('$1$',substring(unix_timestamp(now()),6,10),'$')));

Regards,
Sergey




reply via email to

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