From: | Amn Ojee Uw <amnojeeuw(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Peer authentication failed ??? |
Date: | 2023-10-03 09:55:51 |
Message-ID: | 8cac9e3b-f03b-2a6f-f787-958b83775321@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Harry Green | 2023-10-03 09:59:41 | Re: [EXT]Re: Connection not allowed because of an error 'Not in pg_hba.conf' |
Previous Message | David Rowley | 2023-10-03 09:19:19 | Re: pg_stat_statements IN problem |