Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VklzC-0002Xh-SS for pgsql-admin@arkaria.postgresql.org; Mon, 25 Nov 2013 02:33:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VklzB-0007W2-0x for pgsql-admin@arkaria.postgresql.org; Mon, 25 Nov 2013 02:33:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vklz8-0007Vp-U9; Mon, 25 Nov 2013 02:33:14 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vklz0-0002up-Bd; Mon, 25 Nov 2013 02:33:13 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 9275D5F7CC; Sun, 24 Nov 2013 21:38:05 -0500 (EST) Date: Sun, 24 Nov 2013 21:38:05 -0500 From: Stephen Frost To: Abbas Cc: pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: GSSAPI authentication with AD Message-ID: <20131125023805.GB17272@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eB5sX4hp6/8Km/nH" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.8.0-25-generic (x86_64) X-Uptime: 21:33:18 up 134 days, 22:42, 10 users, load average: 0.01, 0.04, 0.05 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) 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 --eB5sX4hp6/8Km/nH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Abbas, * Abbas (abbas.dba@gmail.com) wrote: > created enterprisedb user in AD with DES encryption type. Do not use DES- it's not secure and there's no reason to use it. Use AES instead. > -bash-4.1$ klist >=20 > Ticket cache: FILE:/tmp/krb5cc_501 >=20 > Default principal: POSTGRES/centos@MY.TESTDOMAIN.LAN This is the problem- with Kerberos and GSSAPI, you need to have a 'service' princ (that's the POSTGRES/my.host.name one) *and* a 'user' princ (in your case, that should be 'enterprisedb'). The 'service' princ needs to be exported as a keytab, as you've done, and then made available to the PostgreSQL server (which I think you've done). However, the 'user' princ should acquire credentials through a normal 'kinit' (which is what happens when a user logs on to a Windows system with AD). > -bash-4.1$ ~/bin/psql -h centos.MY.TESTDOMAIN.LAN -U enterprisedb > psql: FATAL: GSSAPI authentication failed for user "enterprisedb" > -bash-4.1$ >=20 > pglogs : >=20 > LOG: provided user name (enterprisedb) and authenticated user name > (POSTGRES/centos) do not match Right, this is telling you that you're using a principal (POSTGRES/centos) which doesn't match the user that you're trying to authenticate as ('enterprisedb'). Thanks, Stephen --eB5sX4hp6/8Km/nH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJSkrgNAAoJEO1sijiDR2RV/9QQAI0A2gVbvLjEY4yrCfckFfNS wjufRRJtdHr4GaU7jSvbF4jYwySP64k3GOBgy121zqCFeaYoXcxMgYgYxCcrnvys n3BVEbTxaQS5CTRVBEg1QobwsSjAnCn+v5nR6zy6BfTectfXtg2A4p9rn1qEjcjQ ihgU1hlZ9duU/rmirDK7OztEAMJMhqTRHkbdyuicgG5Ij/feYle+D+Ylp3Iv7TKf /Xd1izs0vJgTv4LXYBCEDF+5ipECZNeCnC1zxrOfApKknHChH4VvcIqOyKs2sYOT o6EYDMACqLQGJdUeuvo8osFFatCbyXkyWnh4+nieYts26WHzda7QItNXTo1/EMKe ltaLbohHLNipOw/HiGCOqVZR2LLzsYf1BimlWPFI/ZxFK/8n37aGDMmSjvucev1K jzkXkoLe4MqQz2kGie8ROLP0C5n6AMiLzEjraNOxH3w057WGRHPV33lpatFGfhbM Or5+BmtWEI/K70JiTH0UAQpDwuUsuiFK5AQtMoJxoFmQ1VAqAp01fVi8OmwvGtA2 qx5XRN5OjdTj1j4GnsAPBZzmySXQbu8pOe+gS3QdokXl0PCRM3ZHxDtTU3QEbcB8 uXgeGuFVV/WISqhlxe3hHiN6WRTszj5Xr9HJzGUFXP3rJ6MHITKr2KmLB8JL3Ucp svjE4iKm5MTr1WOwc8/R =p8Jf -----END PGP SIGNATURE----- --eB5sX4hp6/8Km/nH--