Re: In a fix: lost superuser - Mailing list pgsql-general

From jdassen@cistron.nl (J.H.M. Dassen (Ray))
Subject Re: In a fix: lost superuser
Date
Msg-id slrn9fv2td.m6.jdassen@odin.cistron-office.nl
Whole thread Raw
In response to In a fix: lost superuser  (Ken <mailinglists@creason.com>)
Responses Re: In a fix: lost superuser
List pgsql-general
Ken <mailinglists@creason.com> wrote:
> Is there any way to reset the superuser password if it has been lost?

I haven't tried it, but I guess the following should work:
- As root, edit the pg_hba.conf to allow access without the postgres
  superuser password
    "host all 127.0.0.1 255.255.255.255 trust"
- connect to postgres
    "psql -U postgres template1"
- put a new password on the postgres user
    "alter user postgresql with password 'fubar'"
- restore the old pg_hba.conf

HTH,
Ray
--
NATUURLIJK krijg je er geen signaal doorheen - het is *dark* fibre.
    jtv

pgsql-general by date:

Previous
From: Renaud Thonnart
Date:
Subject: Re: table inheritance
Next
From: Holger Klawitter
Date:
Subject: Re: In a fix: lost superuser