pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: 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: Thu, 15 Oct 2020 12:46:38 -0400
Message-ID: <20201015164638.GE3797@momjian.us> (raw)
In-Reply-To: <3643196.1602724051@sss.pgh.pa.us>
References: <16672-cdf02792fc851417@postgresql.org>
	<3640830.1602720588@sss.pgh.pa.us>
	<000101d6a28c$e4fdfca0$aef9f5e0$@asahi-net.or.jp>
	<3643196.1602724051@sss.pgh.pa.us>

On Wed, Oct 14, 2020 at 09:07:31PM -0400, Tom Lane wrote:
> "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.

I am surprised we don't get more problem reports about this.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee






view thread (5+ messages)

Message-ID: <20201015164638.GE3797@momjian.us>
Permalink:  ../20201015164638.GE3797@momjian.us/
Also on:    postgresql.org/message-id/20201015164638.GE3797@momjian.us

 · 

reply

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: bruce@momjian.us, 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: <20201015164638.GE3797@momjian.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