Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W33AU-0006Jv-Bf for pgsql-admin@arkaria.postgresql.org; Tue, 14 Jan 2014 12:32:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W33AT-0001zl-Rg for pgsql-admin@arkaria.postgresql.org; Tue, 14 Jan 2014 12:32:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W33AT-0001zf-5G for pgsql-admin@postgresql.org; Tue, 14 Jan 2014 12:32:29 +0000 Received: from mail-we0-x229.google.com ([2a00:1450:400c:c03::229]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W33AQ-0002nz-HI for pgsql-admin@postgresql.org; Tue, 14 Jan 2014 12:32:28 +0000 Received: by mail-we0-f169.google.com with SMTP id u57so317328wes.0 for ; Tue, 14 Jan 2014 04:32:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:reply-to:to:date:content-type:mime-version :content-transfer-encoding; bh=TEf8NTtwcxrcbt6g4tFaC67bzZIqodEhsxB4teCALYQ=; b=aSsFU2MY1u9oB54/gjzIIb0NBTlIVDrwOexVw3ZL4CA9X56GW2PNKfC0pm/xu5S8fY pxgW7hNj+m8C8EcicplNS6BEKHltFb/vanrFRw59PgOIsgGpzdQ0nCkqgjdEpEUcoBck BQ3F1qF/MVzyygmVtTOw555D0zdHRWhUcAhcAXa25uvFCAyFFipB+SHPnWFe/ogMZtQJ 33+XVWN59X93QPSRFj7MBWti99T4y3pkPdlzXqoW8l7OA/oofPCKX2HAkmOM8SzbVDXW wkvksyhWdMJRk5eKm/qB84gB2eaSbb2YebLky5jkA0tOruUWaPxsnC4nwul55bdJnBHB 7Mvw== X-Received: by 10.180.11.34 with SMTP id n2mr20460321wib.40.1389702745789; Tue, 14 Jan 2014 04:32:25 -0800 (PST) Received: from [192.168.0.20] (89.141.101.243.dyn.user.ono.com. [89.141.101.243]) by mx.google.com with ESMTPSA id eo4sm1249976wib.9.2014.01.14.04.32.24 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 14 Jan 2014 04:32:25 -0800 (PST) Message-ID: <1389702744.9086.55.camel@turing> Subject: GSSAPI auth issue with windows 7 client, postgresql 9.2.3 linux server From: jaime soler Reply-To: jaime.soler@gmail.com To: pgsql-admin@postgresql.org Date: Tue, 14 Jan 2014 13:32:24 +0100 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Hi list, I am able to successfully authenticate a Windows server AD user with PostgreSQL 9.2.3 version from linux clients but It doesn't work with Windows client. First I logon windows 7, using a Active Directory's user, then I tried to login to postgresql 9.2.3 server with psql: psql -h hostname -p 5444 psql: SSPI continuation error: The encryption type requested is not supported by the KDC. (80090342) postgresql.log : -1 log: connection received: host = 172.XXX.XXX.XXX port = 61877 -1FATAL: GSSAPI authentication failed for 'userXX' user userXX exists in our postgresql server and pg_hba.conf applied to 172.XXX.XXX.XXX subnet is: host all all 172.0.0.0/8 gss Our postgresql.conf use keytab: krb_server_keyfile = 'postgres.keytab' And I have generated keytab with this ktpass command: ktpass -out postgres.keytab -princ postgres/hostname@domain -mapUser postgres -pass XXX -crypto DES-CBC-MD5 The postgres user, exists in the Active Directory and it has a spn defined: C:\Users\Administrator>setspn -S postgres/hostname domain\postgres Checking domain DC=domain Registering ServicePrincipalNames for CN=postgres,CN=Users,DC=domain postgres/hostname Updated object If I login from a linux client to linux server, there is no problem: [root@hostnane datos]# su - userXX [userXX@hostname ~]$ klist Ticket cache: FILE:/tmp/krb5cc_503 Default principal: userXX@domain Valid starting Expires Service principal 12/11/13 08:42:04 12/11/13 18:42:09 krbtgt/domain@domain renew until 12/18/13 08:42:04 12/11/13 08:42:43 12/11/13 18:42:09 postgres/hostname@domain renew until 12/18/13 08:42:04 [userXX@u2vbddpg ~]$ psql -h 172.XX.XX.XX psql (9.2.1.3) Type "help" for help. edb=> Thanks -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin