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 1npY6Y-0004vT-U5 for pgsql-general@arkaria.postgresql.org; Fri, 13 May 2022 16:25:27 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1npY6X-0000D5-Lk for pgsql-general@arkaria.postgresql.org; Fri, 13 May 2022 16:25:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npY6X-0000Cl-AA for pgsql-general@lists.postgresql.org; Fri, 13 May 2022 16:25:25 +0000 Received: from srvimsva2.dst.dk ([91.208.143.64]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1npY6V-0001Kb-Aq for pgsql-general@lists.postgresql.org; Fri, 13 May 2022 16:25:24 +0000 Received: from srvimsva2.dst.dk (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3BD4810408E for ; Fri, 13 May 2022 18:25:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dst.dk; s=dmz20180119; t=1652459122; bh=kI5FhnD5VLCyj1QbqWvh/3yf6m63TuUm8w1KfhzqB2U=; h=From:To:Date; b=hPmWr+Ngi+4QgREr5rW0gTJZuGH1JhZr752mw6oZovUK2pWwB6XrjRA5zWoAIXmlu +H8jmsc7JVI7PlTWvw2r0d0K2gG7uQ0PBnmYjnwm6lG7Zw+hmAK03LmlG+177EO4uE yoCX/obt8fBriu86wsJPs6OjRFqIvsYfD42RXQNs= Received: from srvimsva2.dst.dk (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 230BB10408B for ; Fri, 13 May 2022 18:25:22 +0200 (CEST) Received: from Sepo.dst.dk (unknown [192.168.64.12]) by srvimsva2.dst.dk (Postfix) with ESMTP for ; Fri, 13 May 2022 18:25:21 +0200 (CEST) Received: from srvexc8.dst.local ([172.30.32.48]) by Sepo.dst.dk (JAMES SMTP Server 2.3.2-1) with SMTP ID 887 for ; Fri, 13 May 2022 18:25:21 +0200 (CEST) Received: from srvexc8.dst.local (172.30.32.48) by srvexc8.dst.local (172.30.32.48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 13 May 2022 18:25:21 +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; Fri, 13 May 2022 18:25:21 +0200 From: Niels Jespersen To: pgsql-general list Subject: Logon via GSSAPI from Linux fails, but works from Windows Thread-Topic: Logon via GSSAPI from Linux fails, but works from Windows Thread-Index: Adhm5XfoY8RlCPw5QJW855PtJAM0fw== Date: Fri, 13 May 2022 16:25:21 +0000 Message-ID: <3307acb3f9a84562a704c85b8e0c5a25@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: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 Hello all We have our analysis users log on to Postgres without a password. Instead w= e rely on their Windows identity.=20 When the Postgres server is on Windows, we use SSPI. Works great.=20 When the Postgres server is on Linux, we use GSSAPI. Works great. Now, we are introducing Linux for analysts to run their Python/R/SQL/whatev= er.=20 They log onto Linux using their Windows identity. The Linux analysis server= s are joined to the Windows domain using sssd.=20 This gives us a headache. Logging onto Postgres without a password does not= immediately work when the Windows user is logged onto a Linux server with = their Windows credentials.=20 Linux is Ubuntu 22.04 on the client side, Ubuntu 20.04 on the Postgres serv= er side. Postgres server version is server 14.2 (Ubuntu 14.2-1.pgdg20.04+1)= . psql client is psql (PostgreSQL) 14.2 (Ubuntu 14.2-1ubuntu1). What happens is this yyy@srvpython8:~$ psql service=3Dbigdata_db1 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.30.33.30), port 1609 = failed: GSSAPI continuation error: Unspecified GSS failure. Minor code may= provide more information: Server not found in Kerberos database yyy@srvpython8:~$ The Postgres server log has this.=20 2022-05-13 18:14:01.140 CEST,,,474093,"172.30.32.213:33554",627e83c9.73bed,= 1,"",2022-05-13 18:14:01 CEST,,0,LOG,00000,"connection received: host=3D172= .30.32.213 port=3D33554",,,,,,,,,"","not initialized",,0 2022-05-13 18:14:01.159 CEST,,,474094,"172.30.32.213:33556",627e83c9.73bee,= 1,"",2022-05-13 18:14:01 CEST,,0,LOG,00000,"connection received: host=3D172= .30.32.213 port=3D33556",,,,,,,,,"","not initialized",,0 2022-05-13 18:14:01.176 CEST,"yyy","db1",474094,"172.30.32.213:33556",627e8= 3c9.73bee,2,"authentication",2022-05-13 18: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 Are we forgetting to set something up?=20 Regards Niels Jespersen