Peer authentication failed ???

Поиск
Список
Период
Сортировка
От Amn Ojee Uw
Тема Peer authentication failed ???
Дата
Msg-id 8cac9e3b-f03b-2a6f-f787-958b83775321@gmail.com
обсуждение исходный текст
Ответы Re: Peer authentication failed ???
Re: Peer authentication failed ???
Список 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 по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: pg_stat_statements IN problem
Следующее
От: Harry Green
Дата:
Сообщение: Re: [EXT]Re: Connection not allowed because of an error 'Not in pg_hba.conf'