pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedAuthentication: MD5 to SCRAM-SHA-256 error
5+ messages / 4 participants
[nested] [flat]
* Authentication: MD5 to SCRAM-SHA-256 error
@ 2019-11-15 16:23 Dave Hughes <dhughes20@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Dave Hughes @ 2019-11-15 16:23 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Hello,
We're currently using PostgreSQL version 10.5 in a Linux environment. We
were wanting to change the password authentication from MD5 to
SCRAM-SHA-256. I performed these steps to do so:
1) Modified the postgresql.conf and changed the password_encryption entry
from "md5" to "scram-sha-256".
2) restarted the database
3) Changed all our users password to a default password using the command:
alter user xxx password 'xxx';
4) Once I did this, I could run this sql statement and verify the password
was now a sha-256 password:
select passwd from pg_shadow where username = 'xxx'
5) Finally, i went into the pg_hba.conf file and changed the
authentication method from md5 over to scram-sha-256.
6) restarted the database again.
However when I try to log in now, via command line, I receive the error:
"psql: authentication method 10 not supported". I tried to search online
for this error but everything I've seen implies that occurs when some
client's libraries are not compatible, but i'm just using psql via the
command line.
What's worse...I tried to set everything back to MD5 and i'm still getting
the exact same error. Has anyone else experienced this? The only thing I
can think of is that even though I'm on version 10.5, maybe somehow I have
old libraries it's trying to use to connect?
Any help would be greatly appreciated!
Thanks!
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Authentication: MD5 to SCRAM-SHA-256 error
@ 2019-11-15 16:38 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Dave Hughes <dhughes20@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Adrian Klaver @ 2019-11-15 16:38 UTC (permalink / raw)
To: Dave Hughes <dhughes20@gmail.com>; pgsql-general@lists.postgresql.org
On 11/15/19 8:23 AM, Dave Hughes wrote:
> Hello,
> We're currently using PostgreSQL version 10.5 in a Linux environment.
> We were wanting to change the password authentication from MD5 to
> SCRAM-SHA-256. I performed these steps to do so:
> 1) Modified the postgresql.conf and changed the password_encryption
> entry from "md5" to "scram-sha-256".
> 2) restarted the database
> 3) Changed all our users password to a default password using the command:
> alter user xxx password 'xxx';
> 4) Once I did this, I could run this sql statement and verify the
> password was now a sha-256 password:
> select passwd from pg_shadow where username = 'xxx'
> 5) Finally, i went into the pg_hba.conf file and changed the
> authentication method from md5 over to scram-sha-256.
> 6) restarted the database again.
>
> However when I try to log in now, via command line, I receive the error:
> "psql: authentication method 10 not supported". I tried to search
> online for this error but everything I've seen implies that occurs when
> some client's libraries are not compatible, but i'm just using psql via
> the command line.
>
> What's worse...I tried to set everything back to MD5 and i'm still
> getting the exact same error. Has anyone else experienced this? The
> only thing I can think of is that even though I'm on version 10.5, maybe
> somehow I have old libraries it's trying to use to connect?
>
> Any help would be greatly appreciated!
What Linux distro and version?
How was Postgres installed?
Do you have more then one instance of Postgres installed?
> Thanks!
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Authentication: MD5 to SCRAM-SHA-256 error
@ 2019-11-15 16:44 Christoph Moench-Tegeder <cmt@burggraben.net>
parent: Dave Hughes <dhughes20@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Christoph Moench-Tegeder @ 2019-11-15 16:44 UTC (permalink / raw)
To: Dave Hughes <dhughes20@gmail.com>; +Cc: pgsql-general@lists.postgresql.org
## Dave Hughes (dhughes20@gmail.com):
> However when I try to log in now, via command line, I receive the error:
> "psql: authentication method 10 not supported".
Your client (more precisely: it's libpq) is not ready for SCRAM.
I guess you're using an older (<10) client version? Mixed up
packages?
Regards,
Christoph
--
Spare Space
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Authentication: MD5 to SCRAM-SHA-256 error
@ 2019-11-15 20:17 Dave Hughes <dhughes20@gmail.com>
parent: Christoph Moench-Tegeder <cmt@burggraben.net>
0 siblings, 1 reply; 5+ messages in thread
From: Dave Hughes @ 2019-11-15 20:17 UTC (permalink / raw)
To: Christoph Moench-Tegeder <cmt@burggraben.net>; adrian.klaver@aklaver.com; +Cc: pgsql-general@lists.postgresql.org
Thanks for replying guys! You both led me down the right path. I didn't
realize it, but looks like we had 2 directories where psql was installed.
Once I gave the path specifically to PostgreSQL10, it worked like a charm.
I'm reaching out to our server admins now to see why there are 2
instances.
Thanks again for pointing me in the right direction.
On Fri, Nov 15, 2019 at 11:44 AM Christoph Moench-Tegeder <
cmt@burggraben.net> wrote:
> ## Dave Hughes (dhughes20@gmail.com):
>
> > However when I try to log in now, via command line, I receive the error:
> > "psql: authentication method 10 not supported".
>
> Your client (more precisely: it's libpq) is not ready for SCRAM.
> I guess you're using an older (<10) client version? Mixed up
> packages?
>
> Regards,
> Christoph
>
> --
> Spare Space
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Authentication: MD5 to SCRAM-SHA-256 error
@ 2019-11-18 12:05 Michael Paquier <michael@paquier.xyz>
parent: Dave Hughes <dhughes20@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Michael Paquier @ 2019-11-18 12:05 UTC (permalink / raw)
To: Dave Hughes <dhughes20@gmail.com>; +Cc: Christoph Moench-Tegeder <cmt@burggraben.net>; adrian.klaver@aklaver.com; pgsql-general@lists.postgresql.org
On Fri, Nov 15, 2019 at 03:17:17PM -0500, Dave Hughes wrote:
> Thanks for replying guys! You both led me down the right path. I didn't
> realize it, but looks like we had 2 directories where psql was installed.
> Once I gave the path specifically to PostgreSQL10, it worked like a charm.
>
> I'm reaching out to our server admins now to see why there are 2
> instances.
Maybe remnants of past version packages for an upgrade where
pg_upgrade has been involved? You need both the old and new binaries
when doing that, and most distributions allow different major versions
of Postgres to be installed in parallel.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2019-11-18 12:05 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 16:23 Authentication: MD5 to SCRAM-SHA-256 error Dave Hughes <dhughes20@gmail.com>
2019-11-15 16:38 ` Adrian Klaver <adrian.klaver@aklaver.com>
2019-11-15 16:44 ` Christoph Moench-Tegeder <cmt@burggraben.net>
2019-11-15 20:17 ` Dave Hughes <dhughes20@gmail.com>
2019-11-18 12:05 ` Michael Paquier <michael@paquier.xyz>
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