Re: Encrypted Passwords

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Rob Abernethy IV <abernethy(at)dynedge(dot)com>
Cc: postgresql <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Encrypted Passwords
Date: 2003-01-10 21:10:18
Message-ID: 200301102110.h0ALAJP09820@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Stephan Szabo 2003-01-11 05:53:42 Re: restore/dup OIDs HELP!
Previous Message Campano, Troy 2003-01-10 19:29:16 FW: [GENERAL] shell script when a user logs in