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

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

AW: [Help-gnu-radius] Password on a MySQL Server


From: Dan Beldiman
Subject: AW: [Help-gnu-radius] Password on a MySQL Server
Date: Fri, 28 Feb 2003 00:51:19 +0100

Hi Mario,

You should pay attention that you are using a good alogrithm to encrypt you
passwords (gnu radius supports DES and MD5) DES only compares the first 8
characters of a password, MD5 compares the entire password.

I use the following mysql function to encrypt the password:
ENCRYPT('PLAIN-PASSWORD',concat('$1$',substring(rand(),3,8),'$'))

This will create MD5 password, with a random salt, the $1$ showd the Crypt
function that you want a MD5 PW.

I hope this helps to avoid a bad supprise after the rollout :)
Dan

> -----Ursprüngliche Nachricht-----
> Von: address@hidden
> [mailto:address@hidden Auftrag
> von Edward Rudd
> Gesendet: Mittwoch, 26. Februar 2003 19:27
> An: Mario - Firewalls
> Cc: GNU-Radius
> Betreff: Re: [Help-gnu-radius] Password on a MySQL Server
>
>
> The passwords are crypted..
> so basically do this..
> INSERT INTO user_name (username,password) VALUES
> ('myuser',CRYPT('mypass'))
> or you can use the php crypt function
>
> $crypted_pass = crypt('mypass');
> and then insert that contents of $crypted_pass into the Database.
> make sure your password field is long enough though.. Mine is 34
> characters.
>
> On Wed, 2003-02-26 at 09:58, Mario - Firewalls wrote:
> > Hi there,
> > I'm trying to use GNU-Radius with MySQL, so I realized that the
> passwords stored on a mysql server must be encrypted. Does it
> realy need to be encrypted? could it be in cleartext/plaintext ?
> > If not, how I encrypt the password before storing it ?
> > I tryied to encrypt with md5sum(from slackware) with
> MD5,ENCRYPT and DES functions of mysql, with functions of
> PHP(crypt,md5,base64_encode/decode) and I did not get it working !
> >
> > PS: Using md5(php) and after using the function base64_encode I
> get a supposed working string, but MySQL does not accept it on a
> varchar field, cuz they're invalid chars.
> >
> > Please need help.
> > Thanks a lot!
> >
> > Mario Leao.
> > Firewalls Security Corporation
> > www.firewalls.com.br
> >
> > Key fingerprint = C2BA B98D EE25 BEAF E0EF  4AD6 4B75 DDD2 1D74 97C7
> >
> >
> >
> > _______________________________________________
> > Help-gnu-radius mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/help-gnu-radius
> --
> Edward Rudd <address@hidden>
>
>
>
> _______________________________________________
> Help-gnu-radius mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-gnu-radius
>
>






reply via email to

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