psql: FATAL: password authentication failed for user "postgres" postgresql version 10

Postgres store password md5 format as default. If you want to change password encryption you have to follow bellow solution:

P.S: Before start, You have to undo pg_hba.conf file authenticate method to md5

  1. Edit postgresql.conf and change password_encryption to
password_encryption = scram-sha-256
  1. Restart Postgres service (or reload service)

  2. reset the user password

# if use psql cli
\password <user>

# If use SQL command
alter user <user> with password '<password>';
  1. After updating all passwords you should change pg_hba.conf authenticate method to scram-sha-256 and reset service again

Reference: Information about upgrade postgres password authenicate