Re: Encrypted Passwords - Mailing list pgsql-admin

From Bruce Momjian
Subject Re: Encrypted Passwords
Date
Msg-id 200301102110.h0ALAJP09820@candle.pha.pa.us
Whole thread Raw
In response to Encrypted Passwords  ("Rob Abernethy IV" <abernethy@dynedge.com>)
List pgsql-admin
Rob Abernethy IV wrote:
> How does postgres calculate the MD5 version of a password to store in the
> database during user creation?  I am trying to set up a postgres JDBCRealm to
> work with Tomcat.  The problem is that the resulting digest from Java is
> different then the digest stored in the database for the same word.
>
> clear-text: tomcat
> java: 1b359d8753858b55befa0441067aaed3
> postgres: md5efcc1c51a80be13b59cdb96d758a0184

What did you use as salt?  PostgreSQL users the user name as salt.
When I run /contrib/pgcrypto's MD5 I get the same value as PostgreSQL.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-admin by date:

Previous
From: "Rob Abernethy IV"
Date:
Subject: Re: Encrypted Passwords
Next
From: philo vivero
Date:
Subject: Re: repair table? database? how ? neccessary?