Re: how to recover superuser password ?

Поиск
Список
Период
Сортировка
От Joel Burton
Тема Re: how to recover superuser password ?
Дата
Msg-id 20021202164225.GA11465@temp.joelburton.com
обсуждение исходный текст
Ответ на how to recover superuser password ?  (Patrick <pat@patoche.org>)
Ответы Re: how to recover superuser password ?  (Patrick <pat@patoche.org>)
Список pgsql-novice
On Mon, Dec 02, 2002 at 05:34:04PM +0100, Patrick wrote:
> My superuser (postgres) had a password.
> I attempted to change it by doing (and not thinking very much):
> template1=# alter user postgres with password '';
> ALTER USER
> template1=# \q
>
> After what I am unable to connect anymore as superuser, which is a
> big problem (plain [ENTER] on the password prompt is rejected)
>
> Is there any way to change the superuser password without completely
> deleting my postgreSQL installation which is in use in production ?
> (I have complete unix root access)
>
> Thanks to all in advance.
> I did not found anything relevant online.

Change your pg_hba.conf to allow connections from the localhost as
"trust" (then kill -HUP the postmaster to notice the changes here).
Log in from localhost (you won't be prompted for a
password). Now you can change your password.

Be sure to change pg_hba.conf back to what it was!

--

Joel BURTON  |  joel@joelburton.com  |  joelburton.com  |  aim: wjoelburton
Independent Knowledge Management Consultant

В списке pgsql-novice по дате отправления:

Предыдущее
От: Patrick
Дата:
Сообщение: how to recover superuser password ?
Следующее
От: Malcolm Hutty
Дата:
Сообщение: "next"