Re: Test mail for pgsql-general - Mailing list pgsql-general

From Chris Miller
Subject Re: Test mail for pgsql-general
Date
Msg-id 1738731565.8400.1726010470879.JavaMail.zimbra@tryx.org
Whole thread Raw
Responses Re: Test mail for pgsql-general
Re: Test mail for pgsql-general
List pgsql-general
@page { size: 8.5in 11in; margin: 0.79in } p { line-height: 120%; margin-bottom: 0.1in; background: transparent } p.western { font-family: "Liberation Sans", sans-serif }
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.

pgsql-general by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: Overlapping values (?) in multi-column partitioned tables
Next
From: "David G. Johnston"
Date:
Subject: Re: Test mail for pgsql-general