(RADIATOR) md5 encryption

radiator at int.ch radiator at int.ch
Fri Jun 29 00:52:31 CDT 2001


Hi,

That is not the right way to do it.  Here is a code snippit I use:

#!/usr/bin/perl

use Crypt::PasswdMD5;

sub GenerateMD5Password {
        local($Password) = @_;
        my $Salt = sprintf("%4.4x%4.4x",  rand(10000000), rand(10000000));
        if (! $Password ){
           die("no password supplied");
        }

        my $MD5Password = unix_md5_crypt($Password, $Salt);
        return ($MD5Password);

}

Mickey

At 07:37 29-06-01, Separovic, Jason wrote:
-----Start of Original Message----- 
The whole string seems to be in the database.

Maybe the md5 I'm using is not right. I'm not sure how to use the perl md5
encryption but I have a java equivilent which for example encrypts the
string 'password' 
into 5f4dcc3b5aa765d61d8327deb882cf99.
So I add this string into the database useing $1$ as its prefix.

thanks
Jason


> -----Original Message-----
> From: radiator at int.ch [SMTP:radiator at int.ch]
> Sent: Friday,29 June 2001 3:00
> To:   Separovic, Jason
> Cc:   'radiator at open.com.au'
> Subject:      Re: (RADIATOR) md5 encryption
> 
> Hi,
> 
> I had a similar problem, and then realized that the column
> I had defined in my db was a couple of bytes too short to
> hold the entire md5 password.
> 
> Mickey
> 
> At 06:08 29-06-01, Separovic, Jason wrote:
> -----Start of Original Message----- 
> I'm having a problem with authenticating md5 encrypted passwords.
> 
> Here is my config :
> 
> <AuthBy SQL>
>         # Adjust DBSource, DBUsername, DBAuth to suit your DB
>         DBSource        dbi:Pg:dbname=radiusdb
>         DBUsername      postgres
>         DBAuth          password
> 
>         RejectEmptyPassword
> 
>         AuthSelect select ENCRYPTEDPASSWORD,CHECKATTR,REPLYATTR from
> SUBSCRIBERS where USERNAME='%U'
>         AuthColumnDef 0, User-Password, check
> </AuthBy>
> 
> I'm getting the following message - "Access rejected for user: Bad
> Password"
> 
> ENCRYPTEDPASSWORD is $1$<md5 encrypted password>
> 
> I don't know what I am missing.
> 
> 
> -----End of Original Message----- 

-----End of Original Message----- 

===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list