From: Tom Lane <tgl@sss.pgh.pa.us>
To: Logan Greenlee <logan@thegreenlees.us>
Cc: pgsql-odbc@postgresql.org
Subject: Re: SCRAM Error
Date: Sat, 10 Oct 2020 12:01:49 -0400
Message-ID: <2887053.1602345709@sss.pgh.pa.us> (raw)
In-Reply-To: <CAGXY7a-cyGHJJH5tWhFT40RPKeO=ftRgr70BFwyB6LDkVkVm-w@mail.gmail.com>
References: <CAGXY7a-cyGHJJH5tWhFT40RPKeO=ftRgr70BFwyB6LDkVkVm-w@mail.gmail.com>
Logan Greenlee <logan@thegreenlees.us> writes:
> I am receiving an error "SCRAM Authentication requires libpq version 10 or
> above".
> ...
> [33236-0.005]connection[CC_initial_log]982: Driver Version='09.06.0500,Jan
> 25 2019' linking 1800 dynamic Multithread library
Since the ODBC driver seems to be 9.6, it's not surprising that it's
linked to a 9.6 libpq. Can't you update that?
> Is this due to the libpq version being insufficient in the driver? I am
> connecting to a 13 instance. I tried to go to md5 but it seemed to have no
> effect.
It seems like your server may be set to hash passwords via SCRAM. If you
need compatibility with ancient client versions, you need to make sure
your password is hashed the old way with md5. Observe:
regression=# create user joe;
CREATE ROLE
regression=# set password_encryption to "scram-sha-256";
SET
regression=# alter user joe password 'foo';
ALTER ROLE
regression=# select rolpassword from pg_authid where rolname = 'joe';
rolpassword
--------------------------------------------------------------------------------
-------------------------------------------------------
SCRAM-SHA-256$4096:LSVE1BFWcxrIJSTEeZF/8g==$ceM/afcYjb8zwIjD3MIXmubeu/F2ZieAzYL
LeAzck6k=:ge1TjRpYn7kNf0pAJoohYRURT9LGLFIEPK48M1pJZ8c=
(1 row)
regression=# set password_encryption = md5;
SET
regression=# alter user joe password 'foo';
ALTER ROLE
regression=# select rolpassword from pg_authid where rolname = 'joe';
rolpassword
-------------------------------------
md516fa7b3dfbb8654ea1e0a864754ee209
(1 row)
regards, tom lane
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-odbc@postgresql.org
Cc: tgl@sss.pgh.pa.us, logan@thegreenlees.us
Subject: Re: SCRAM Error
In-Reply-To: <2887053.1602345709@sss.pgh.pa.us>
References: <CAGXY7a-cyGHJJH5tWhFT40RPKeO=ftRgr70BFwyB6LDkVkVm-w@mail.gmail.com> <2887053.1602345709@sss.pgh.pa.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