Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3DMW1837421 for ; Fri, 13 Apr 2001 18:32:01 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3CBPE848656 for ; Thu, 12 Apr 2001 07:25:14 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f3CB08i56481 for pgsql-sql@postgresql.org; Thu, 12 Apr 2001 07:00:09 -0400 (EDT) (envelope-from news) From: =?iso-8859-1?Q?Hans=2DJ=FCrgen=20Sch=F6nig?= X-Newsgroups: comp.databases.postgresql.sql Subject: Bug in user management? Date: Thu, 12 Apr 2001 13:03:17 +0200 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 100 Message-ID: <3AD58B75.D5911B57@cybertec.at> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------3D019E226ABB11304C7D3D88" X-Complaints-To: scrappy@hub.org X-Mailer: Mozilla 4.76 [de] (X11; U; Linux 2.2.16-22 i686) X-Accept-Language: en To: pgsql-sql@postgresql.org X-Archive-Number: 200104/212 X-Sequence-Number: 2562 --------------3D019E226ABB11304C7D3D88 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I need some information about PostgreSQL user management. I have created a user called epi who is not allowed to create database but allowed to create users. I have connected as user epi and have then created user kertal with the following command: shop=# CREATE USER kertal WITH PASSWORD 'anypasswd' CREATEDB CREATEUSER IN GROUP cybertec; According to the system table kertal is allowed to create databases - I have also tried this as user kertal and it works. In my opinion a user that has not the right to create database MUST NOT create user that are allowed to do it. Have I done something wrong or is it a bug? Hans persons=# SELECT * FROM pg_user ; usename | usesysid | usecreatedb | usetrace | usesuper | usecatupd | passwd | valuntil ----------+----------+-------------+----------+----------+-----------+----------+---------- postgres | 26 | t | t | t | t | ******** | hans | 27 | f | f | f | f | ******** | epi | 28 | f | f | t | t | ******** | kertal | 29 | t | f | t | t | ******** | (4 rows) -- ------------------------------------------------------------------- Cybertec Geschwinde &. Schönig OEG; Schönbrunnerstraße 133/18 A-1050 Wien; http://postgres.cybertec.at; Fax.: +43/1/961 71 58 Tel.: +43/664/233 90 75 --------------3D019E226ABB11304C7D3D88 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit I need some information about PostgreSQL user management.
I have created a user called epi who is not allowed to create database but allowed to create users.
I have connected as user epi and have then created user kertal with the following command:

shop=# CREATE USER kertal WITH PASSWORD 'anypasswd' CREATEDB CREATEUSER IN GROUP cybertec;

According to the system table kertal is allowed to create databases - I have also tried this as user kertal and it works.
In my opinion a user that has not the right to create database MUST NOT create user that are allowed to do it.

Have I done something wrong or is it a bug?

    Hans
 

persons=# SELECT * FROM pg_user ;
 usename  | usesysid | usecreatedb | usetrace | usesuper | usecatupd |  passwd  |
valuntil
----------+----------+-------------+----------+----------+-----------+----------+----------
 postgres |       26 | t           | t        | t        | t         | ******** |
 hans     |       27 | f           | f        | f        | f         | ******** |
 epi      |       28 | f           | f        | t        | t         | ******** |
 kertal   |       29 | t           | f        | t        | t         | ******** |
(4 rows)
 

-- 
-------------------------------------------------------------------
Cybertec Geschwinde &. Schönig OEG; Schönbrunnerstraße 133/18
A-1050 Wien; http://postgres.cybertec.at; Fax.: +43/1/961 71 58
Tel.: +43/664/233 90 75
  --------------3D019E226ABB11304C7D3D88--