Re: Manually authenticating users in pg_shadow

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Manually authenticating users in pg_shadow
Дата
Msg-id 2151.1075251315@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Manually authenticating users in pg_shadow  ("William Harazim" <wharazim@fulcoinc.com>)
Список 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 по дате отправления:

Предыдущее
От: "Colm De Barra"
Дата:
Сообщение: Fw: postgres DB duplication
Следующее
От: Jerome Lyles
Дата:
Сообщение: Re: Permission Problems:-)?