Re: How to create users for a login Role?

From: KhunSanAung <khunsanaung(dot)gis(at)gmail(dot)com>
To: Evgeniy Losev <e(dot)losev(at)i-free(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: How to create users for a login Role?
Date: 2015-10-12 07:42:01
Message-ID: CAAQr1jbLzzzjCVP2CwoBqrRDs-MSBn=Pph9hAuQm3dUvA2bCug@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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(dot)losev(at)i-free(dot)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/>*

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Evgeniy Losev 2015-10-12 07:49:51 Re: How to create users for a login Role?
Previous Message Evgeniy Losev 2015-10-12 07:18:26 НА: How to create users for a login Role?