encrypted passwords

Started by Milos Prudekalmost 22 years ago6 messagesgeneral
Jump to latest
#1Milos Prudek
prudek@bvx.cz

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

#2Jim Seymour
jseymour@LinxNet.com
In reply to: Milos Prudek (#1)
Re: encrypted passwords

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

#3Berend Tober
btober@computer.org
In reply to: Jim Seymour (#2)
Re: encrypted passwords

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

#4Oliver Elphick
olly@lfix.co.uk
In reply to: Jim Seymour (#2)
Re: encrypted passwords

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

#5Milos Prudek
prudek@bvx.cz
In reply to: Oliver Elphick (#4)
Re: encrypted passwords

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

#6Oliver Elphick
olly@lfix.co.uk
In reply to: Milos Prudek (#5)
Re: encrypted passwords

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