pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: valeh.agayev@gmail.com
Subject: BUG #16239: It is not possible to upgrade the password from md5 to SCRAM
Date: Fri, 31 Jan 2020 11:44:42 +0000
Message-ID: <16239-be97116acd827c0a@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      16239
Logged by:          Valeh Agayev
Email address:      valeh.agayev@gmail.com
PostgreSQL version: 12.1
Operating system:   CentOS Linux release 7.7.1908 (Core)
Description:        

It is not possible to upgrade the password from md5 to SCRAM with \password
command, but with alter command is possible.

postgres=# SHOW password_encryption;
 password_encryption 
---------------------
 scram-sha-256
(1 row)

postgres=# SELECT rolname,rolpassword ~'^SCRAM-SHA-256\$' AS has_upgraded
FROM pg_authid WHERE rolcanlogin;
 rolname  | has_upgraded 
   ---------- +--------------
 u1           | f
 postgres | f

postgres=# \password u1;
Enter new password: 
Enter it again: 
postgres=# SELECT rolname,rolpassword ~'^SCRAM-SHA-256\$' AS has_upgraded
FROM pg_authid WHERE rolcanlogin;
 rolname  | has_upgraded 
 postgres | f
 u1           | f
(5 rows)


postgres=# alter user u1 encrypted PASSWORD '123';
ALTER ROLE

postgres=# SELECT rolname,rolpassword ~'^SCRAM-SHA-256\$' AS has_upgraded
FROM pg_authid WHERE rolcanlogin;
 rolname  | has_upgraded 
----------+--------------
 postgres | f
 u1       | t



view thread (2+ messages)  latest in thread

Message-ID: <16239-be97116acd827c0a@postgresql.org>
Permalink:  ../16239-be97116acd827c0a@postgresql.org/
Also on:    postgresql.org/message-id/16239-be97116acd827c0a@postgresql.org

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, valeh.agayev@gmail.com
  Subject: Re: BUG #16239: It is not possible to upgrade the password from md5 to SCRAM
  In-Reply-To: <16239-be97116acd827c0a@postgresql.org>
  References: <16239-be97116acd827c0a@postgresql.org>

* 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