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
METHODof all rows in yourpg_hba.conffile fromscram-sha-256totrust - Add
binfolder 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.confto original state
Now you should be able to enter password for postgres in pgAdmin.