From: Tom Lane <tgl@sss.pgh.pa.us>
To: akada shigeki <zz5s-akd@asahi-net.or.jp>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16672: Postgres user passwords are corrupted during migration
Date: Wed, 14 Oct 2020 21:07:31 -0400
Message-ID: <3643196.1602724051@sss.pgh.pa.us> (raw)
In-Reply-To: <000101d6a28c$e4fdfca0$aef9f5e0$@asahi-net.or.jp>
References: <16672-cdf02792fc851417@postgresql.org>
<3640830.1602720588@sss.pgh.pa.us>
<000101d6a28c$e4fdfca0$aef9f5e0$@asahi-net.or.jp>
"akada shigeki" <zz5s-akd@asahi-net.or.jp> writes:
> solved.
> I was able to restore by changing SCRAM-SHA-256 in HBA.Conf to MD5.
> Does this mean that PSQL doesn't support SHA-256 encryption?
No, it means if you want to use SCRAM authentication then you need the
password that's stored in pg_authid to be hashed with SCRAM. The password
you carried forward from v12 evidently isn't. (Again, look into pg_authid
to confirm that.)
Do this, in either v12 or v13, to update the password:
set password_encryption to "scram-sha-256";
alter user postgres with password 'clear text password here';
The system cannot do this for you because there's no way to recover
the cleartext password from the md5 hash.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, zz5s-akd@asahi-net.or.jp, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16672: Postgres user passwords are corrupted during migration
In-Reply-To: <3643196.1602724051@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox