Restrict CREATEROLE privilege grant to NOLOGIN only? - Mailing list pgsql-general

From Alexander M. Sauer-Budge
Subject Restrict CREATEROLE privilege grant to NOLOGIN only?
Date
Msg-id A30FDF8F-25AC-4D16-BEB0-1B8D21ECDEC3@alum.mit.edu
Whole thread Raw
List pgsql-general
Is it possible to create a login user who themselves can CREATE ROLE NOLOGIN but not CREATE ROLE LOGIN? Here’s an
exampleof the behavior I’d like to achieve. 

$ psql
postgres=> CREATE USER admin WITH PASSWORD 'mypassword' CREATEROLE;
postgres=> — revoke something?
postgres=> \q

$ psql -U admin -W
postgres=> CREATE ROLE myrole;
CREATE ROLE
postgres=> CREATE USER myuser WITH PASSWORD '1234’;
ERROR:  permission denied to create role

Of course, as written the final “CREATE USER” statement succeeds in reality.

Thanks,
Alex

pgsql-general by date:

Previous
From: Manuel Gómez
Date:
Subject: Re: foreign key with where clause
Next
From: Victor Blomqvist
Date:
Subject: Limit Heap Fetches / Rows Removed by Filter in Index Scans