Peer authentication failed ??? - Mailing list pgsql-general

From Amn Ojee Uw
Subject Peer authentication failed ???
Date
Msg-id 8cac9e3b-f03b-2a6f-f787-958b83775321@gmail.com
Whole thread Raw
Responses Re: Peer authentication failed ???  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: Peer authentication failed ???  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
List pgsql-general

Hi there.

Using the 'sudo -u postgres psql' command I created a group and two accounts in the group, I also created a database for one of the accounts. Now, I'd like to login PG-15, using my new account and connecting to my new database, but PG-15 complains. See the example below, I think it is clear than my English.

CREATE ROLE my_group; // Create a group
CREATE ROLE my_group_admin LOGIN PASSWORD 'AdminPassword' CREATEDB CREATEROLE; // Create admin
CREATE ROLE my_group_worker LOGIN PASSWORD 'WorkerPassword' CREATEDB; // Create Worker
GRANT my_group TO my_group_admin WITH INHERIT TRUE;
GRANT my_group TO my_group_worker WITH INHERIT TRUE;

CREATE DATABASE my_group_db WITH OWNER my_group_worker;
\q
psql -U my_group_worker -d my_group_db

psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  Peer authentication failed for user "my_group_worker"

*** What am I doing wrong?


Thanks in advance.

pgsql-general by date:

Previous
From: David Rowley
Date:
Subject: Re: pg_stat_statements IN problem
Next
From: Harry Green
Date:
Subject: Re: [EXT]Re: Connection not allowed because of an error 'Not in pg_hba.conf'