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.