public inbox for [email protected]
help / color / mirror / Atom feedFrom: Chris Miller <[email protected]>
To: pgsql-general <[email protected]>
Subject: Re: Test mail for pgsql-general
Date: Tue, 10 Sep 2024 16:21:10 -0700 (PDT)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
Hi Folks,
I am confused about authentication. I understand that in the local connection case, I have choices of “peer”, and “md5” (password).
In pg_hba.conf, I have the lines:
local all all peer
local all all md5
I have an OS user “postgres”, and I can “su – postgres”, which brings me to a shell and I can invoke psql successfully.
I believe that, as root, I should be able to “psql -U postgres -W” and logon with a password. I can’t. When I try, I get:
psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer authentication failed for user "postgres"
Notice I am failing “peer” authentication. Seems to me that if I explicitly ask for a password, “-W”, I should be using “md5” authentication.
Can anybody straighten me out?
Thanks for the help,
--
Chris.
view thread (2+ 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]
Subject: Re: Test mail for pgsql-general
In-Reply-To: <[email protected]>
* 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