From: Charles Clavadetscher <clavadetscher@swisspug.org>
To: Atul Kumar <akumar14871@gmail.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: user privileges
Date: Mon, 21 Jun 2021 14:30:55 +0200
Message-ID: <ca6366b5643742052eecc2a359757986@swisspug.org> (raw)
In-Reply-To: <CA+ONtZ6XTcVg0k-4mNQ5gFqxx6-BWABoTRKpDvcwuTU4K-3x_A@mail.gmail.com>
References: <CA+ONtZ6XTcVg0k-4mNQ5gFqxx6-BWABoTRKpDvcwuTU4K-3x_A@mail.gmail.com>
Hello
On 2021-06-21 12:40, Atul Kumar wrote:
> Hi,
>
> My question can be silly but I need to ask that if a user is created
> without login privilege then what is the use of below command why
> don't postgres prompt error on it
>
> CREATE ROLE nolog_user WITH PASSWORD 'pass1';
A user without login privilege is usally called a group and is used for
bundling privileges that you can grant granting the role to individual
users. This helps you to keep more order and structure in your DB
privileges.
You may also have a user that can login and for whatever reason must be
restricted access for a certain time.
> as the user is created with login privileges then what is the use such
> user ?
See above.
> Where such users having no login privileges can be used ?
Yes, you use it as a group.
--
Charles Clavadetscher
Spitzackerstrasse 9
CH - 8057 Zürich
https://www.swisspug.org
+------------------------+
| ____ ______ ___ |
| / )/ \/ \ |
| ( / __ _\ ) |
| \ (/ o) ( o) ) |
| \_ (_ ) \ ) _/ |
| \ /\_/ \)/ |
| \/ <//| |\\> |
| _| | |
| \|_/ |
| |
| Swiss PostgreSQL |
| Users Group |
+------------------------+
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: clavadetscher@swisspug.org, akumar14871@gmail.com
Subject: Re: user privileges
In-Reply-To: <ca6366b5643742052eecc2a359757986@swisspug.org>
References: <CA+ONtZ6XTcVg0k-4mNQ5gFqxx6-BWABoTRKpDvcwuTU4K-3x_A@mail.gmail.com> <ca6366b5643742052eecc2a359757986@swisspug.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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