Re: Sorry, real newbie question about connecting to a database - Mailing list pgsql-general

From Tom Lane
Subject Re: Sorry, real newbie question about connecting to a database
Date
Msg-id 22803.1566226504@sss.pgh.pa.us
Whole thread Raw
In response to Sorry, real newbie question about connecting to a database  (stan <stanb@panix.com>)
List pgsql-general
stan <stanb@panix.com> writes:
> But I cannot conect, or swith to user
> employee:

> stan@smokey:/etc/postgresql/11/main$ psql -U employee
> psql: FATAL:  Peer authentication failed for user "employee"

This means that you've set pg_hba.conf to specify "peer" authentication,
which by default only lets you connect as a PG role named the
same as your OS account.  (This is about are-you-who-you-say-you-are;
whether who-you-say-you-are has privilege to connect is independent.)

You could use some other auth method, or you could set up a mapping
file that says you (stan) are allowed to connect as "employee".

            regards, tom lane



pgsql-general by date:

Previous
From: stan
Date:
Subject: Sorry, real newbie question about connecting to a database
Next
From: Adrian Klaver
Date:
Subject: Re: Sorry, real newbie question about connecting to a database