I ran into the same problem recently. The solution below works for me. I’m using Windows btw, so you should try equivalent commands in your OS.
- Change
METHOD
of all rows in yourpg_hba.conf
file fromscram-sha-256
totrust
- Add
bin
folder of Postgres installation to path, if you haven’t - Open command prompt and enter
psql -U postgres
. You won’t be asked for password here. - Enter
\password postgres
- Choose and confirm your password
- Revert
pg_hba.conf
to original state
Now you should be able to enter password for postgres
in pgAdmin.