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 1nyBUa-0000Bo-1m for pgsql-general@arkaria.postgresql.org; Mon, 06 Jun 2022 12:05:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nyBUY-0006kO-TL for pgsql-general@arkaria.postgresql.org; Mon, 06 Jun 2022 12:05: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 1nyBUY-0006k0-D9 for pgsql-general@lists.postgresql.org; Mon, 06 Jun 2022 12:05:54 +0000 Received: from srvimsva2.dst.dk ([91.208.143.64]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nyBUQ-0006TH-HA for pgsql-general@lists.postgresql.org; Mon, 06 Jun 2022 12:05:53 +0000 Received: from srvimsva2.dst.dk (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D958110406A for ; Mon, 6 Jun 2022 14:05:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dst.dk; s=dmz20180119; t=1654517142; bh=KnYB9NmOicUHhCMaBVmas6SJlfmwDv2mx75s8xk6V3E=; h=From:To:Date; b=Y/KaEI69YOukCwmCGA+f39mClnY0d1asNKyIJCEugGD0cjaDCZxyfyrYtj5AwsQfX D0WiZD41OE8JtDoUFvvE3r9xrSuaYs93qr5mJDq8JrocRmaoKAauuMfp44eJYR+zv2 2FRpLFqgFF3TelpByZj5/X7NMWh34kELHxIjwQJQ= Received: from srvimsva2.dst.dk (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C414C104067 for ; Mon, 6 Jun 2022 14:05:42 +0200 (CEST) Received: from Sepo.dst.dk (unknown [192.168.64.12]) by srvimsva2.dst.dk (Postfix) with ESMTP for ; Mon, 6 Jun 2022 14:05:42 +0200 (CEST) Received: from srvexc9.dst.local ([172.30.32.49]) by Sepo.dst.dk (JAMES SMTP Server 2.3.2-1) with SMTP ID 51 for ; Mon, 6 Jun 2022 14:05:42 +0200 (CEST) Received: from srvexc8.dst.local (172.30.32.48) by srvexc9.dst.local (172.30.32.49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 6 Jun 2022 14:05:42 +0200 Received: from srvexc8.dst.local ([fe80::9df8:5de5:1bf2:8b3b]) by srvexc8.dst.local ([fe80::9df8:5de5:1bf2:8b3b%2]) with mapi id 15.01.2375.024; Mon, 6 Jun 2022 14:05:42 +0200 From: Niels Jespersen To: pgsql-general list Subject: GSSAPI authentication Thread-Topic: GSSAPI authentication Thread-Index: Adh5nb31g96Ln4nxQYOsrkwHsld97g== Date: Mon, 6 Jun 2022 12:05:42 +0000 Message-ID: <9f1254f4ffc24460a3c0ba34f062f33e@dst.dk> Accept-Language: da-DK, en-US Content-Language: da-DK X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.33.38] Content-Type: multipart/alternative; boundary="_000_9f1254f4ffc24460a3c0ba34f062f33edstdk_" MIME-Version: 1.0 X-TM-AS-GCONF: 00 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --_000_9f1254f4ffc24460a3c0ba34f062f33edstdk_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello all We are running Postgres 14 on Ubuntu. Our Windows users connect passwordles= s using GSSAPI. This works great. Now we want users on Linux client to also connect passwordless using GSSAPI= . Users on Linux log on using their Active Directory credentials, as the Li= nux host (Ubuntu 22.04) is joined to the domain. Logon to Linux works fine,= access to Windows cifs shares works fine authentication with Kerberos. But psql won't connect using GSSAPI. It does hit the right pg_hba.conf line= and the username is translated via pg_ident.conf, just fine. But psql says psql: error: connection to server at "srvpostgres4.xxx.local" (172.30.33.30= ), port 1609 failed: could not initiate GSSAPI security context: Unspecifie= d GSS failure. Minor code may provide more information: Server not found i= n Kerberos database connection to server at "srvpostgres4.xxx.local" (172.3= 0.33.30), port 1609 failed: GSSAPI continuation error: Unspecified GSS fail= ure. Minor code may provide more information: Server not found in Kerberos= database Server log is like this 2022-06-06 08:14:01.176 CEST,"yyy","db1",474094,"172.30.32.213:33556",627e8= 3c9.73bee,2,"authentication",2022-06-06 08:14:01 CEST,2/14544,0,FATAL,28000= ,"GSSAPI authentication failed for user ""yyy""","Connection matched pg_hba= .conf line 15: ""host all all 172.0.0.0/8 = gss map=3Dxxxlocal include_realm=3D0 krb_realm=3D""XXX.LOCAL""""",,,,= ,,,,"","client backend",,-3382135431624836920 We are a bit lost here. What are we missing? Regards Niels Jespersen --_000_9f1254f4ffc24460a3c0ba34f062f33edstdk_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello all

 

We are running Postgres 14 on Ubuntu. Our Windows users= connect passwordless using GSSAPI. This works great.

 

Now we want users on Linux client to also connect passw= ordless using GSSAPI. Users on Linux log on using their Active Directory cr= edentials, as the Linux host (Ubuntu 22.04) is joined to the domain. Logon to Linux works fine, access to Windows cifs shares wo= rks fine authentication with Kerberos.

 

But psql won't connect using GSSAPI. It does hit the ri= ght pg_hba.conf line and the username is translated via pg_ident.conf, just= fine. But psql says

 

psql: error: connection to server at "srvpostgres4= .xxx.local" (172.30.33.30), port 1609 failed: could not initiate GSSAP= I security context: Unspecified GSS failure.  Minor code may provide more information: Server not found in Kerberos database connection= to server at "srvpostgres4.xxx.local" (172.30.33.30), port 1609 = failed: GSSAPI continuation error: Unspecified GSS failure.  Minor cod= e may provide more information: Server not found in Kerberos database

 

Server log is like this

 

2022-06-06 08:14:01.176 CEST,"yyy","db1&= quot;,474094,"172.30.32.213:33556",627e83c9.73bee,2,"authent= ication",2022-06-06 08:14:01 CEST,2/14544,0,FATAL,28000,"GSSAPI a= uthentication failed for user ""yyy""","Connection matched pg_hba= .conf line 15: ""host    all   &nbs= p;         all   &nb= sp;         172.0.0.0/8  =            gss map=3Dxxxl= ocal include_realm=3D0 krb_realm=3D""XXX.LOCAL"""&= quot;",,,,,,,,"","client backend",,-33821354316248= 36920

 

We are a bit lost here. What are we missing?

 

Regards Niels Jespersen

 

 

 

 

 

 

 

 

 

--_000_9f1254f4ffc24460a3c0ba34f062f33edstdk_--