Re: md5 in pg_shadow?

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: subhash(at)nmsu(dot)edu
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: md5 in pg_shadow?
Date: 2005-05-12 22:40:18
Message-ID: 20050512224017.GA55711@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, May 12, 2005 at 03:01:17PM -0600, subhash(at)nmsu(dot)edu wrote:
>
> I was trying to write a function to validate the username and its password in
> the pg_shadow table. The function should take in the username and password as
> arguments and see if it matches with those in the pg_shadow table. But the md5
> hashed password in pg_shadow doesnot match with what i get when i do
> select 'md5' || md5('some_password');

Try this:

SELECT 'md5' || md5('some_password' || 'some_user');

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Greg Stark 2005-05-13 06:05:37 Re: interesting SQL puzzle - concatenating column with itself.
Previous Message subhash 2005-05-12 21:01:17 md5 in pg_shadow?