Re: Manually authenticating users in pg_shadow - Mailing list pgsql-general

From Tom Lane
Subject Re: Manually authenticating users in pg_shadow
Date
Msg-id 2151.1075251315@sss.pgh.pa.us
Whole thread Raw
In response to Manually authenticating users in pg_shadow  ("William Harazim" <wharazim@fulcoinc.com>)
List pgsql-general
"William Harazim" <wharazim@fulcoinc.com> writes:
> Is there a way, having a user entered username and password, to select a si=
> ngle row from pg_shadow which is using md5 password encryption?

I think what you need to know is that the stored passwd field is formed
thus:

    'md5' || md5(password || username);

Substitute this for your crypt() call and you're set.  Don't think you
need the separate step to extract salt (you didn't need it before
either, really).

            regards, tom lane

pgsql-general by date:

Previous
From: "Colm De Barra"
Date:
Subject: Fw: postgres DB duplication
Next
From: Jerome Lyles
Date:
Subject: Re: Permission Problems:-)?