X-Original-To: pgsql-admin@postgresql.org Received: from localhost (unknown [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id E443E925C5B for ; Thu, 22 May 2003 09:39:08 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 18737-02 for ; Thu, 22 May 2003 09:38:37 -0400 (EDT) Received: from wolff.to (wolff.to [66.93.249.74]) by developer.postgresql.org (Postfix) with SMTP id F04949261EE for ; Thu, 22 May 2003 08:29:07 -0400 (EDT) Received: (qmail 21631 invoked by uid 500); 22 May 2003 12:31:05 -0000 Date: Thu, 22 May 2003 07:31:05 -0500 From: Bruno Wolff III To: ivan Cc: pgsql-admin@postgresql.org Subject: Re: SECURITY Message-ID: <20030522123105.GB20191@wolff.to> Mail-Followup-To: ivan , pgsql-admin@postgresql.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/295 X-Sequence-Number: 8857 On Wed, May 21, 2003 at 20:18:03 +0200, ivan wrote: > > > why when i create user and create database for this user, he can connect > to my others database , (not only his own) and create there tables and > etc. > He can not select , delete etc but he can create something and then drop > this , is can be like a bug ? In 7.2 and higher you can control this (being able to connect to a database) in pg_hba.conf by setting up per user per database rules for authentication methods. As an alternative in 7.3 and higher you can control being able to create objects in a database. To prevent creation of schemas and temporary tables issue: REVOKE ALL ON DATABASE database_name FROM PUBLIC; The PUBLIC schema allows object creation by default. To prevent people from creating objects there issue: REVOKE CREATE ON SCHEMA PUBLIC FROM PUBLIC;