pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: subhash@nmsu.edu
Cc: pgsql-sql@postgresql.org
Subject: Re: md5 in pg_shadow?
Date: Thu, 12 May 2005 16:40:18 -0600
Message-ID: <20050512224017.GA55711@winnie.fuhr.org> (raw)
In-Reply-To: <1115931677.4283c41db0689@webmail.nmsu.edu>
References: <1115931677.4283c41db0689@webmail.nmsu.edu>

On Thu, May 12, 2005 at 03:01:17PM -0600, subhash@nmsu.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/



view thread (2+ messages)

Message-ID: <20050512224017.GA55711@winnie.fuhr.org>
Permalink:  ../20050512224017.GA55711@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20050512224017.GA55711@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, subhash@nmsu.edu
  Subject: Re: md5 in pg_shadow?
  In-Reply-To: <20050512224017.GA55711@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox