Thread: Password forgotten
Hello.
In my Debian box, after entering this command to psql-16, psql -h localhost -U postgres
psql-16 asks for the password, which I have forgotten.
So I get this message:
psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "postgres"
connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "postgres"
Is there a way I can retrieve this master password?
Thanks in advance.
ArbolOne.ca Using Fire Fox and Thunderbird. ArbolOne is composed of students and volunteers dedicated to providing free services to charitable organizations. ArbolOne on Java Development is in progress [ í ]
Hello.
In my Debian box, after entering this command to psql-16, psql -h localhost -U postgrespsql-16 asks for the password, which I have forgotten.
So I get this message:psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "postgres"
connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "postgres"Is there a way I can retrieve this master password?
Thanks in advance.
--
ArbolOne.ca Using Fire Fox and Thunderbird. ArbolOne is composed of students and volunteers dedicated to providing free services to charitable organizations. ArbolOne on Java Development is in progress [ í ]
--
On Tuesday, April 23, 2024, Arbol One <ArbolOne@hotmail.ca> wrote:
Hello.
In my Debian box, after entering this command to psql-16, psql -h localhost -U postgrespsql-16 asks for the password, which I have forgotten.
So I get this message:psql: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "postgres"
connection to server at "localhost" (::1), port 5432 failed: FATAL: password authentication failed for user "postgres"Is there a way I can retrieve this master password?
"David G. Johnston" <david.g.johnston@gmail.com> writes: > On Tuesday, April 23, 2024, Arbol One <ArbolOne@hotmail.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
On Tue, Apr 23, 2024 at 08:14:15AM -0400, Arbol One wrote: > Hello. > In my Debian box, after entering this command to psql-16, *psql -h localhost > -U postgres* You might want to read https://www.depesz.com/2008/11/28/recovering-lost-postgresql-password/ Best regards, depesz