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