Thread: encrypted passwords

encrypted passwords

From
Milos Prudek
Date:
I cannot set up password authentication with encrypted passwords. With
plaintext passwords auth works fine. So my guess is that I am using an
incorrect password encryption program.

What encryption utility should I use to store an MD5 password?

I tried md5sum, but passwords encrypted with md5sum will not let me log in.

I also tried classic "crypt", and I used Python's crypt module to
encrypt my password, and it did not work either.

--
Milos Prudek


Re: encrypted passwords

From
jseymour@linxnet.com (Jim Seymour)
Date:
>
> I cannot set up password authentication with encrypted passwords. With
> plaintext passwords auth works fine. So my guess is that I am using an
> incorrect password encryption program.
>
> What encryption utility should I use to store an MD5 password?
>
> I tried md5sum, but passwords encrypted with md5sum will not let me log in.
>
> I also tried classic "crypt", and I used Python's crypt module to
> encrypt my password, and it did not work either.

You don't manually encrypt them with anything.  You enter them
plain-text and pgsql encrypts them before storage.

Jim

Re: encrypted passwords

From
Date:
>>
>> I cannot set up password authentication with encrypted passwords.
>> With  plaintext passwords auth works fine. So my guess is that I am
>> using an  incorrect password encryption program.
>>
>> What encryption utility should I use to store an MD5 password?
>>
>> I tried md5sum, but passwords encrypted with md5sum will not let me
>> log in.
>>
>> I also tried classic "crypt", and I used Python's crypt module to
>> encrypt my password, and it did not work either.
>
> You don't manually encrypt them with anything.  You enter them
> plain-text and pgsql encrypts them before storage.
>

But, FWIW, someone else in an earlier thread posted that what gets stored
in the passwd column of pg_shadow is the value returned by

select 'md5'||encode(digest('your_password'||'your_username' , 'md5'),
'hex')


--Berend Tober




Re: encrypted passwords

From
Oliver Elphick
Date:
On Tue, 2004-06-08 at 11:43, Jim Seymour wrote:
> >
> > I cannot set up password authentication with encrypted passwords. With
> > plaintext passwords auth works fine. So my guess is that I am using an
> > incorrect password encryption program.
> >
> > What encryption utility should I use to store an MD5 password?
> >
> > I tried md5sum, but passwords encrypted with md5sum will not let me log in.
> >
> > I also tried classic "crypt", and I used Python's crypt module to
> > encrypt my password, and it did not work either.
>
> You don't manually encrypt them with anything.  You enter them
> plain-text and pgsql encrypts them before storage.

I am meeting the same problem as the original poster.  I am using
7.4.2.  I have verified that passwords are stored encrypted in pg_shadow
(with "md5" as the prefix).  I have verified that an md5 password is
being transmitted from psql, and I have reset the password so as to
ensure that there is no difference between the supplied and the stored
passwords, but the authentication still fails.

I'm pursuing this with gdb, but if anyone has a quick solution, it would
be nice to know.

--
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
     "Therefore being justified by faith, we have peace with
      God through our Lord Jesus Christ."       Romans 5:1


Re: encrypted passwords

From
Milos Prudek
Date:
> I am meeting the same problem as the original poster.  I am using
> 7.4.2.  I have verified that passwords are stored encrypted in pg_shadow

Did you find out anything interesting?

--
Milos Prudek


Re: encrypted passwords

From
Oliver Elphick
Date:
On Thu, 2004-06-10 at 16:17, Milos Prudek wrote:
> > I am meeting the same problem as the original poster.  I am using
> > 7.4.2.  I have verified that passwords are stored encrypted in pg_shadow
>
> Did you find out anything interesting?

Not yet.  I had trouble following in gdb through the various forks and I
haven't had time to try again.

Oliver