pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Nikhil Shetty <nikhil.dba04@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: Upgrading password encryption from md5 to scram-sh-256
Date: Fri, 28 May 2021 16:29:10 +0200
Message-ID: <7fa8483c9d3d1fdc12c3b6aba1eb637ce366b370.camel@cybertec.at> (raw)
In-Reply-To: <CAFpL5VytCu6h4n1hnaRS1BYTNW8uv5jx_FDERwssL_vCNYAfzw@mail.gmail.com>
References: <CAFpL5VytCu6h4n1hnaRS1BYTNW8uv5jx_FDERwssL_vCNYAfzw@mail.gmail.com>

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






view thread (6+ messages)  latest in thread

Message-ID: <7fa8483c9d3d1fdc12c3b6aba1eb637ce366b370.camel@cybertec.at>
Permalink:  ../7fa8483c9d3d1fdc12c3b6aba1eb637ce366b370.camel@cybertec.at/
Also on:    postgresql.org/message-id/7fa8483c9d3d1fdc12c3b6aba1eb637ce366b370.camel@cybertec.at

 · 

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-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, nikhil.dba04@gmail.com
  Subject: Re: Upgrading password encryption from md5 to scram-sh-256
  In-Reply-To: <7fa8483c9d3d1fdc12c3b6aba1eb637ce366b370.camel@cybertec.at>

* 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