[rt-users] RT password stored in db

Karl Pietri kpietri at nvps.net
Mon Feb 2 15:03:19 EST 2004


Ok i have figured this out.  Might want to add it to the wiki (not sure).
to generate the same password as rt in php you need to have php 5.0.0
(currently in beta) and use this code

substr(base64_encode(md5($pass,true)),0,-2) //the substr is to remove the ==
that for some reason is generated at the end of the string

Thanks for the help.

-Karl Pietri
   (616) 365-6126
   LAN Technician
   Northview Public Schools
   Grand Rapids, MI
----- Original Message -----
From: "Ruslan U. Zakirov" <cubic at acronis.ru>
To: "Karl R Pietri" <KPietri at nvps.net>
Cc: <rt-users at lists.bestpractical.com>
Sent: Monday, February 02, 2004 2:17 PM
Subject: Re: [rt-users] RT password stored in db


> Karl R Pietri wrote:
> > Should have been a little more detailed.  I have no
> > programing skill in perl so i am writing the password
> > converter in php.
> > -----from User_Overlay.pm-------
> > returns an MD5 hash of the password passed in, in
> > base64 encoding.
> >
> > =cut
> >
> > sub _GeneratePassword {
> >     my $self = shift;
> >     my $password = shift;
> >
> >     my $md5 = Digest::MD5->new();
> >     $md5->add($password);
> >     return ($md5->b64digest);
> >
> > }
> > ----------------------------------
> >
> > I have tryed various combinations of md5 and
> > base64_encode (and even decode) in php to try and match
> > it.  Http://ww2.nvps.net/~karl/password.php so far none
> > have worked.  Any ideas out there?
>
> I don't know php at all but I think you should use
> base64_encode(md5('password'))
>
> >
> >
> > -Karl Pietri
> >    (616) 365-6126
> >    LAN Technician
> >    Northview Public Schools
> >    Grand Rapids, MI
> >
> >
> > -----Original Message-----
> > From: "Karl Pietri" <kpietri at nvps.net>
> > To: <rt-users at lists.bestpractical.com>
> > Date: Mon, 2 Feb 2004 13:38:50 -0500
> > Subject: [rt-users] RT password stored in db
> >
> >
> >>Can any one tell me how the password is stored in
> >>rt.  (like the function) i need to write a script to
> >>copy users/pass from a different db we already have
> >>setup (where password is stored in plain text).
> >>Thanks
> >>
> >>-Karl Pietri
> >>Northview Public Schools
> >>616-365-6126
> >
> >
> > _______________________________________________
> > rt-users mailing list
> > rt-users at lists.bestpractical.com
> > http://lists.bestpractical.com/mailman/listinfo/rt-users
> >
> > Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm
>
>
> _______________________________________________
> rt-users mailing list
> rt-users at lists.bestpractical.com
> http://lists.bestpractical.com/mailman/listinfo/rt-users
>
> Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm
>




More information about the rt-users mailing list