pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Matthew Dennison <mail@matty-uk.co.uk>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Unable to get PostgreSQL 15 with Kerberos (GSS) working
Date: Thu, 29 Feb 2024 08:59:40 -0500
Message-ID: <ZeCNzJ6P9sjyC+zI@tamriel.snowman.net> (raw)
In-Reply-To: <AS2P191MB2327F703E51AC247B35431A2A75F2@AS2P191MB2327.EURP191.PROD.OUTLOOK.COM>
References: <AS2P191MB2327A6A91D12608E0E3E9403A7552@AS2P191MB2327.EURP191.PROD.OUTLOOK.COM>
	<ZdznbUoY3HjE9qH1@tamriel.snowman.net>
	<AS2P191MB23272C17F525B660638434E4A7582@AS2P191MB2327.EURP191.PROD.OUTLOOK.COM>
	<Zd9pSzNUZyJ64U3a@tamriel.snowman.net>
	<E65D37C9-D2F2-48FE-9B16-534CB32E25F0@matty-uk.co.uk>
	<Zd982SF3w/8sD74o@tamriel.snowman.net>
	<AS2P191MB2327F703E51AC247B35431A2A75F2@AS2P191MB2327.EURP191.PROD.OUTLOOK.COM>

Greetings,

* Matthew Dennison (mail@matty-uk.co.uk) wrote:
> If I run kinit and get Kerberos ticket ahead of running the command I then receive:

Right, have to kinit first.

> psql: error: connection to server at " hostname.mydomain.net " (::1), port 5432 failed: could not initiate GSSAPI security context: Unspecified GSS failure.  Minor code may provide more information: Server not found in Kerberos database

Note the minor code info- Server not found in Kerberos database.  Also
note that it apparently connected to '::1' which would be localhost- by
default, the Kerberos library will do a reverse DNS lookup on the IP
that it connected to, to get the canonical name of the host.  That can
be disabled if necessary but really, when you use
'hostname.mydomain.net' that should be returning the host's real IP
address and not ::1.  I'd suggest looking into fixing that (maybe it's
in /etc/hosts that way?) and then this should work.

There are options to disable reverse DNS for Kerberos too and then it'll
use whatever you pass to '-h' to look the host up in the Kerberos
database, but that's really not ideal.

Thanks,

Stephen

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (11+ messages)  latest in thread

Message-ID: <ZeCNzJ6P9sjyC+zI@tamriel.snowman.net>
Permalink:  ../ZeCNzJ6P9sjyC+zI@tamriel.snowman.net/
Also on:    postgresql.org/message-id/ZeCNzJ6P9sjyC+zI@tamriel.snowman.net

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: sfrost@snowman.net, mail@matty-uk.co.uk
  Subject: Re: Unable to get PostgreSQL 15 with Kerberos (GSS) working
  In-Reply-To: <ZeCNzJ6P9sjyC+zI@tamriel.snowman.net>
  References: <AS2P191MB2327A6A91D12608E0E3E9403A7552@AS2P191MB2327.EURP191.PROD.OUTLOOK.COM> <ZdznbUoY3HjE9qH1@tamriel.snowman.net> <AS2P191MB23272C17F525B660638434E4A7582@AS2P191MB2327.EURP191.PROD.OUTLOOK.COM> <Zd9pSzNUZyJ64U3a@tamriel.snowman.net> <E65D37C9-D2F2-48FE-9B16-534CB32E25F0@matty-uk.co.uk> <Zd982SF3w/8sD74o@tamriel.snowman.net> <AS2P191MB2327F703E51AC247B35431A2A75F2@AS2P191MB2327.EURP191.PROD.OUTLOOK.COM> <ZeCNzJ6P9sjyC+zI@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