Re: Password forgotten

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Arbol One <ArbolOne(at)hotmail(dot)ca>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Password forgotten
Date: 2024-04-23 14:19:17
Message-ID: 3330172.1713881957@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Tuesday, April 23, 2024, Arbol One <ArbolOne(at)hotmail(dot)ca> wrote:
>> psql-16 asks for the password, which I have forgotten.
>> Is there a way I can retrieve this master password?

> Nope. You need to login using a method that doesn’t require a password
> then change the password. See pg_hba.conf for authentication options.
> Usually connecting via local and peer authentication is the default option.

If all else fails, shut the server down and start it in single-user
mode. That will let you in as a superuser and you can use ALTER USER
to reset the role's password.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2024-04-23 15:17:42 Re: Password forgotten
Previous Message David G. Johnston 2024-04-23 13:27:00 Re: Password forgotten