Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRHJj-00026m-3O for pgsql-odbc@arkaria.postgresql.org; Sat, 10 Oct 2020 16:01:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kRHJi-0004A8-1k for pgsql-odbc@arkaria.postgresql.org; Sat, 10 Oct 2020 16:01:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRHJh-0004A1-Sr for pgsql-odbc@lists.postgresql.org; Sat, 10 Oct 2020 16:01:53 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kRHJf-0003KE-Ny for pgsql-odbc@postgresql.org; Sat, 10 Oct 2020 16:01:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 09AG1n7T2887054; Sat, 10 Oct 2020 12:01:50 -0400 From: Tom Lane To: Logan Greenlee cc: pgsql-odbc@postgresql.org Subject: Re: SCRAM Error In-reply-to: References: Comments: In-reply-to Logan Greenlee message dated "Fri, 09 Oct 2020 23:24:03 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2887052.1602345709.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 10 Oct 2020 12:01:49 -0400 Message-ID: <2887053.1602345709@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Logan Greenlee writes: > I am receiving an error "SCRAM Authentication requires libpq version 10 = or > above". > ... > [33236-0.005]connection[CC_initial_log]982: Driver Version=3D'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=3D# create user joe; CREATE ROLE regression=3D# set password_encryption to "scram-sha-256"; SET regression=3D# alter user joe password 'foo'; ALTER ROLE regression=3D# select rolpassword from pg_authid where rolname =3D 'joe'; rolpassword = = = --------------------------------------------------------------------------= ------ ------------------------------------------------------- SCRAM-SHA-256$4096:LSVE1BFWcxrIJSTEeZF/8g=3D=3D$ceM/afcYjb8zwIjD3MIXmubeu= /F2ZieAzYL LeAzck6k=3D:ge1TjRpYn7kNf0pAJoohYRURT9LGLFIEPK48M1pJZ8c=3D (1 row) regression=3D# set password_encryption =3D md5; SET regression=3D# alter user joe password 'foo'; ALTER ROLE regression=3D# select rolpassword from pg_authid where rolname =3D 'joe'; rolpassword = ------------------------------------- md516fa7b3dfbb8654ea1e0a864754ee209 (1 row) regards, tom lane