pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedmd5 in pg_shadow?
2+ messages / 2 participants
[nested] [flat]
* md5 in pg_shadow?
@ 2005-05-12 21:01 subhash@nmsu.edu
0 siblings, 1 reply; 2+ messages in thread
From: subhash@nmsu.edu @ 2005-05-12 21:01 UTC (permalink / raw)
To: pgsql-sql
Hi,
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');
Is there a function already present to do this or how can i get the same hashed
password that i get in pg_shadow so i can write my own function?
Please help me out on this.
Thanks,
Subhash.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: md5 in pg_shadow?
@ 2005-05-12 22:40 Michael Fuhr <mike@fuhr.org>
parent: subhash@nmsu.edu
0 siblings, 0 replies; 2+ messages in thread
From: Michael Fuhr @ 2005-05-12 22:40 UTC (permalink / raw)
To: subhash@nmsu.edu; +Cc: pgsql-sql
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/
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-05-12 22:40 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-12 21:01 md5 in pg_shadow? subhash@nmsu.edu
2005-05-12 22:40 ` Michael Fuhr <mike@fuhr.org>
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