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 G. Johnston <david.g.johnston@gmail.com>
Cc: David Hillman <david@kapitaltrading.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17249: Bug in .pgpass search and/or documentation thereof, Ubuntu 13.4-4
Date: Thu, 28 Oct 2021 12:17:27 -0400
Message-ID: <488035.1635437847@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwb-_1FgMLRFWGXb1WHrkwKMmdtKMWxLDYosuudkbcB70g@mail.gmail.com>
References: <17249-c2fa2b1085dfb2f7@postgresql.org>
	<287305.1635380278@sss.pgh.pa.us>
	<e06bb190-7afb-9002-2333-ff3b8ef4e153@kapitaltrading.com>
	<CAKFQuwb-_1FgMLRFWGXb1WHrkwKMmdtKMWxLDYosuudkbcB70g@mail.gmail.com>

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> Your original email demonstrates that, absent -h localhost, psql is looking
> for and finding a local socket and thus the first matching entry is a
> "local" one which does not require password entry because it is set for
> "peer".  This is working as intended.

Indeed.  If you don't like the results you're getting, you need to go
adjust your pg_hba.conf file.  Right now, you've got it set to apply
different authentication rules for Unix-socket and localhost connections,
and you apparently don't want that.

			regards, tom lane





view thread (5+ messages)

Message-ID: <488035.1635437847@sss.pgh.pa.us>
Permalink:  ../488035.1635437847@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/488035.1635437847@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.g.johnston@gmail.com, 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: <488035.1635437847@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