Re: How to behive if I remove password from postgres role

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Raivo Rebane <raivore55(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to behive if I remove password from postgres role
Date: 2023-03-15 16:12:23
Message-ID: 3339367.1678896743@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Raivo Rebane <raivore55(at)gmail(dot)com> writes:
> Then I altered role of postgres so, that password = NULL.
> Now I am in situation that I can't run any postgres command.
> What I must to do ?

Stop the server, start it in single-user mode (postgres --single),
issue an ALTER USER command to undo the damage.

Or modify pg_hba.conf to let you in without a password. Local
peer auth, for example, is perfectly secure.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2023-03-15 16:18:07 Re: Table scan on 15.2
Previous Message Adrian Klaver 2023-03-15 16:12:11 Re: How to behive if I remove password from postgres role