From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | "'KhunSanAung(dot)GIS(at)gmail(dot)com'" <KhunSanAung(dot)GIS(at)gmail(dot)com>, pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: How to create users for a login Role? |
Date: | 2015-10-12 08:34:11 |
Message-ID: | A737B7A37273E048B164557ADEF4A58B50FB7C7F@ntex2010i.host.magwien.gv.at |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
KhunSanAung wrote:
> I know how to create a login role for a postgres database.
> I used pgAdmin III to create login role and database.
> or via psql command;
> postgres=# CREATE ROLE dbuser PASSWORD 'secret' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
>
>
> I'd like to know how to create users/members for each login role.
> How can I do it?
> I'd like to allow multiple users to access to a database.
>
> I used postgres installed Ubuntu Server and access by pgAdmin III and SSH from Window OS.
I guess the problem here is a confusion over "user", "group" and "role".
In PostgreSQL, there is no difference between user and role.
A "group" is a role (usually with NOLOGIN), and a "user" is a role with LOGIN.
You add a "user" to a "group" by granting the "group" to the "user:
GRANT usergroup TO user1;
If you want to give a bunch of users a certain set of privileges,
grant the privileges to a NOLOGIN role and grant that role to the users.
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | 张文升 | 2015-10-12 08:55:10 | Re: Pacemaker dynamic membership |
Previous Message | Nikolay Popov | 2015-10-12 07:56:09 | Re: Pacemaker dynamic membership |