pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to create users for a login Role?
4+ messages / 3 participants
[nested] [flat]
* How to create users for a login Role?
@ 2015-10-12 04:34 KhunSanAung <khunsanaung.gis@gmail.com>
2015-10-12 07:42 ` Re: How to create users for a login Role? KhunSanAung <khunsanaung.gis@gmail.com>
2015-10-12 08:34 ` Re: How to create users for a login Role? Albe Laurenz <laurenz.albe@wien.gv.at>
0 siblings, 2 replies; 4+ messages in thread
From: KhunSanAung @ 2015-10-12 04:34 UTC (permalink / raw)
To: pgsql-admin
Dear All,
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.
Many thanks & best regards
--
Have a nice day!
--
*Mr. Khun San Aung*
* <http://geoportal.icimod.org/>*
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: How to create users for a login Role?
2015-10-12 04:34 How to create users for a login Role? KhunSanAung <khunsanaung.gis@gmail.com>
@ 2015-10-12 07:42 ` KhunSanAung <khunsanaung.gis@gmail.com>
2015-10-12 07:49 ` Re: How to create users for a login Role? Evgeniy Losev <e.losev@i-free.com>
1 sibling, 1 reply; 4+ messages in thread
From: KhunSanAung @ 2015-10-12 07:42 UTC (permalink / raw)
To: Evgeniy Losev <e.losev@i-free.com>; +Cc: pgsql-admin
Hi All,
Yes.
I have a database, myDatabase1 with owner (I think the same as login role)
db1Owner.
At the moment, I can login to the database with above user only. No other
dbUser can access to it.
I have several tables inside the database.
The database is accessible only with the above login. It is not accessible
to other role/user.
What I like to have is create several users for a database.
e.g.
I like to allow dbUsers1 , dbUsers2, dbUser3,... to be able to access to
the same database (db1Database).
Currently if I assign the dbUsers1 as the owner of the database, the
'db1Owner' cannot not access to the 'myDatabase1' database.
How can I allow multi users to allow to access and edit the database?
How can I create multiple database users to allow to access to the same
database?
I'm just a beginner to postgresDB.
Many thanks & best regards
On Mon, Oct 12, 2015 at 1:48 PM, Evgeniy Losev <e.losev@i-free.com> wrote:
> Hi,
> Please, clarify your question.
> Do you want to create login role with password and grant it to several
> users?
>
> Evgeniy Losev
> ------------------------------
> От: KhunSanAung
> Отправлено: 12.10.2015 7:35
> Кому: pgsql-admin
> Тема: [ADMIN] How to create users for a login Role?
>
>
>
> Dear All,
>
> 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.
>
> Many thanks & best regards
>
> --
> Have a nice day!
> --
>
> *Mr. Khun San Aung*
> * <http://geoportal.icimod.org/>*
>
--
Have a nice day!
--
*Mr. Khun San Aung*
* <http://geoportal.icimod.org/>*
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: How to create users for a login Role?
2015-10-12 04:34 How to create users for a login Role? KhunSanAung <khunsanaung.gis@gmail.com>
2015-10-12 07:42 ` Re: How to create users for a login Role? KhunSanAung <khunsanaung.gis@gmail.com>
@ 2015-10-12 07:49 ` Evgeniy Losev <e.losev@i-free.com>
0 siblings, 0 replies; 4+ messages in thread
From: Evgeniy Losev @ 2015-10-12 07:49 UTC (permalink / raw)
To: KhunSanAung <khunsanaung.gis@gmail.com>; +Cc: pgsql-admin
Hi.
You can create a separate role for database usage and referenig docs at http://www.postgresql.org/docs/9.3/static/sql-grant.html grant particular capabilities to it.
and then grant the role to your users.
Evgeniy Losev
Senior System Administrator
i-Free Business Solutions
________________________________
От: KhunSanAung <khunsanaung.gis@gmail.com>
Отправлено: 12 октября 2015 г. 10:42
Кому: Evgeniy Losev
Копия: pgsql-admin
Тема: Re: [ADMIN] How to create users for a login Role?
Hi All,
Yes.
I have a database, myDatabase1 with owner (I think the same as login role) db1Owner.
At the moment, I can login to the database with above user only. No other dbUser can access to it.
I have several tables inside the database.
The database is accessible only with the above login. It is not accessible to other role/user.
What I like to have is create several users for a database.
e.g.
I like to allow dbUsers1 , dbUsers2, dbUser3,... to be able to access to the same database (db1Database).
Currently if I assign the dbUsers1 as the owner of the database, the 'db1Owner' cannot not access to the 'myDatabase1' database.
How can I allow multi users to allow to access and edit the database?
How can I create multiple database users to allow to access to the same database?
I'm just a beginner to postgresDB.
Many thanks & best regards
On Mon, Oct 12, 2015 at 1:48 PM, Evgeniy Losev <e.losev@i-free.com<mailto:e.losev@i-free.com>> wrote:
Hi,
Please, clarify your question.
Do you want to create login role with password and grant it to several users?
Evgeniy Losev
________________________________
От: KhunSanAung
Отправлено: 12.10.2015 7:35
Кому: pgsql-admin
Тема: [ADMIN] How to create users for a login Role?
?Dear All,
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.
?Many thanks & best regards?
--
Have a nice day!
--
Mr. Khun San Aung
<http://geoportal.icimod.org/;
--
Have a nice day!
--
Mr. Khun San Aung
<http://geoportal.icimod.org/;
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: How to create users for a login Role?
2015-10-12 04:34 How to create users for a login Role? KhunSanAung <khunsanaung.gis@gmail.com>
@ 2015-10-12 08:34 ` Albe Laurenz <laurenz.albe@wien.gv.at>
1 sibling, 0 replies; 4+ messages in thread
From: Albe Laurenz @ 2015-10-12 08:34 UTC (permalink / raw)
To: 'KhunSanAung.GIS@gmail.com' <KhunSanAung.GIS@gmail.com>; 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
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2015-10-12 08:34 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12 04:34 How to create users for a login Role? KhunSanAung <khunsanaung.gis@gmail.com>
2015-10-12 07:42 ` KhunSanAung <khunsanaung.gis@gmail.com>
2015-10-12 07:49 ` Evgeniy Losev <e.losev@i-free.com>
2015-10-12 08:34 ` Albe Laurenz <laurenz.albe@wien.gv.at>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox