Re: Upgrading password encryption from md5 to scram-sh-256 - Mailing list pgsql-admin

From Laurenz Albe
Subject Re: Upgrading password encryption from md5 to scram-sh-256
Date
Msg-id 7fa8483c9d3d1fdc12c3b6aba1eb637ce366b370.camel@cybertec.at
Whole thread Raw
In response to Upgrading password encryption from md5 to scram-sh-256  (Nikhil Shetty <nikhil.dba04@gmail.com>)
List pgsql-admin
On Fri, 2021-05-28 at 18:57 +0530, Nikhil Shetty wrote:
> As per documentation, for upgrading password encryption from md5 to scram-sha-256,
>  we have to set password_encryption to scram-sha-256, reset the user password and
> then change in pg_hba.conf.
> 
> Is there any other way to do this without changing the password? if there are a lot
>  of login users in the database it becomes difficult and it may incur downtime as well.
> 
> I see there is a way the users can do it by themselves but still will incur some downtime.

There is no other way than for the users to set the password again, because PostgreSQL
doesn't know the original password.

You can leave the "pg_hba.conf" entry set to "md5", then users can login with
scram-sha-256 passwords as well as with md5 passwords.  That can make the transition
painless.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




pgsql-admin by date:

Previous
From: Nikhil Shetty
Date:
Subject: Upgrading password encryption from md5 to scram-sh-256
Next
From: Holger Jakobs
Date:
Subject: Re: Upgrading password encryption from md5 to scram-sh-256