public inbox for [email protected]  
help / color / mirror / Atom feed
From: Abraham, Danny <[email protected]>
To: Adrian Klaver <[email protected]>
To: Francisco Olarte <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Abraham, Danny <[email protected]>
Subject: RE: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it)
Date: Wed, 9 Apr 2025 19:21:14 +0000
Message-ID: <SA1PR02MB9698C208DA8AA4A752DEDC988EB42@SA1PR02MB9698.namprd02.prod.outlook.com> (raw)
In-Reply-To: <[email protected]>
References: <SA1PR02MB96986CA15EEF976BFE16D2F28EB42@SA1PR02MB9698.namprd02.prod.outlook.com>
	<CA+bJJby+nA8OVs7AZKgGBX2Dx3ApvhEceWtFiq97crkiER2A=Q@mail.gmail.com>
	<[email protected]>
	<[email protected]>

Thanks again.
Here is the example:
>>>>>>>>
dba-tlv-x6y64k% cat pg_hba.conf
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
local   all         all                               trust
host    all         all         0.0.0.0/0                   scram-sha-256

dba-tlv-x6y64k% pg_ctl reload
server signaled
dba-tlv-x6y64k% psql -Upostgres
Password for user postgres:
psql (17.4)
Type "help" for help.

ctrlmdb=#
>>>>>>>
PSQL should not have asked for the password.
Thanks
Danny

-----Original Message-----
From: Adrian Klaver <[email protected]> 
Sent: Wednesday, April 9, 2025 8:49 PM
To: Abraham, Danny <[email protected]>; Francisco Olarte <[email protected]>
Cc: [email protected]
Subject: Re: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it)



On 4/9/25 10:45 AM, Abraham, Danny wrote:
> Failure eans going down the hba list and asking for the password.

In pg_hba.conf first match wins, sounds like you have password auth line before the trust lines.

You need to provide the complete pg_hba.conf auth lines you are working with.

> 
> 
> Sent from Workspace ONE Boxer
> 
> On Apr 9, 2025 20:04, Francisco Olarte <[email protected]> wrote:
> On Wed, 9 Apr 2025 at 18:20, Abraham, Danny <[email protected]> wrote:
>> Asking for help with inability to connect local using trust Fail 
>> #local   all         all                               trust #local   
>> all   dbauser   peer OK #host    all          all         
>> 127.0.0.1/32          trust
> 
> How are you connecting? Your symptoms matches confusing local with 
> TCP/IP to localhost. They are not the same thing.
> Also, are you on windows? ( which does not have unix sockets ).
> 
> local
> This record matches connection attempts using Unix-domain sockets.
> Without a record of this type, Unix-domain socket connections are 
> disallowed.
> host
> This record matches connection attempts made using TCP/IP. host 
> records match SSL or non-SSL connection attempts as well as GSSAPI 
> encrypted or non-GSSAPI encrypted connection attempts.
> 
> On a unix host psql -h localhost will use the host line, psql -h 
> /socket/path will go to the local one, and no -h defaults to socket.
> On a windows host it default to tcp/ip to localhost.
> 
> Francisco Olarte.

--
Adrian Klaver
[email protected]


view thread (13+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: RE: [EXTERNAL] Re: Cannot connect local with ttrust (pg_upgrade assumes it)
  In-Reply-To: <SA1PR02MB9698C208DA8AA4A752DEDC988EB42@SA1PR02MB9698.namprd02.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox