pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: david@kapitaltrading.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17249: Bug in .pgpass search and/or documentation thereof, Ubuntu 13.4-4
Date: Wed, 27 Oct 2021 20:17:58 -0400
Message-ID: <287305.1635380278@sss.pgh.pa.us> (raw)
In-Reply-To: <17249-c2fa2b1085dfb2f7@postgresql.org>
References: <17249-c2fa2b1085dfb2f7@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> There's a bug in either the .pgpass search, or the documentation thereof, in
> 13.4-4.

Perhaps, but this example doesn't prove it.  Your failing case is

> root@dbserver:~# psql -d postgres -U valid_user
> psql: error: connection to server on socket
> "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  Peer authentication
> failed for user "valid_user"

Notice it says "peer authentication", not "password authentication".
So the password was never asked for, and the problem is that you're
not logged in as "valid_user" (rather, it looks like, as "root").

> root@dbserver:~# psql -d postgres -U valid_user -h localhost
> psql (13.4 (Ubuntu 13.4-4.pgdg20.04+1))
> SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits:
> 256, compression: off)

This is evidently going to a different pg_hba.conf line, which
might or might not be selecting password auth --- we can't see it.

			regards, tom lane





view thread (5+ messages)  latest in thread

Message-ID: <287305.1635380278@sss.pgh.pa.us>
Permalink:  ../287305.1635380278@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/287305.1635380278@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david@kapitaltrading.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17249: Bug in .pgpass search and/or documentation thereof, Ubuntu 13.4-4
  In-Reply-To: <287305.1635380278@sss.pgh.pa.us>

* 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