I'm trying to connect Postgres server with the gssapi protocol. User accounts have been created in Active Directory.
I used the following commands:
postgres@xxxxx:John $ ktutil
ktutil: add_entry -password -p POSTGRES/myserver.domain.com -k 1 -e aes256-cts-hmac-sha1-96
Password for POSTGRES/myserver.domain.com@myad.domain.com
ktutil: write_kt postgres.keytab
ktutil: quit
postgres@xxxxx:John $ klist -k postgres.keytab
Keytab name: FILE:postgres.keytab
KVNO Principal
---- --------------------------------------------------------------------------
1 POSTGRES/myserver.domain.com@myad.domain.com
postgres@xxxxx:John $ kinit john
Password for john@myad.domain.com
postgres@xxxxx:John $ klist
Ticket cache: KEYRING:persistent:26:26
Default principal: john@myad.domain.com
Valid starting Expires Service principal
09/28/2020 14:45:09 09/29/2020 00:45:09 krbtgt/myad.domain.com@myad.domain.com
renew until 10/05/2020 14:45:00
When I try connecting with my admin user, I got this unsuccessful reply.
psql -d postgres -h pgserver -p 5432 -U john@domain.com
psql: GSSAPI continuation error: Unspecified GSS failure. Minor code may provide more information
GSSAPI continuation error: Server not found in Kerberos database
What are the missing steps?