From: Stephen Frost <sfrost@snowman.net>
To: Abbas <abbas.dba@gmail.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: GSSAPI authentication with AD
Date: Sun, 24 Nov 2013 21:38:05 -0500
Message-ID: <20131125023805.GB17272@tamriel.snowman.net> (raw)
In-Reply-To: <CAHq+KHJOvZT8M-o_sE+QzqqBGnUjNubWo_rRmpHZyw5ZUuaseg@mail.gmail.com>
References: <CAHq+KHJOvZT8M-o_sE+QzqqBGnUjNubWo_rRmpHZyw5ZUuaseg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
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
>
> Ticket cache: FILE:/tmp/krb5cc_501
>
> 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$
>
> pglogs :
>
> 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
Attachments:
signature.asc (application/pgp-signature, 835B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: sfrost@snowman.net, abbas.dba@gmail.com, pgsql-general@postgresql.org
Subject: Re: GSSAPI authentication with AD
In-Reply-To: <20131125023805.GB17272@tamriel.snowman.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox