Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3ODPx314955 for ; Tue, 24 Apr 2001 09:25:59 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f3ODKhL59030 for pgsql-admin@postgresql.org; Tue, 24 Apr 2001 09:20:43 -0400 (EDT) (envelope-from news) From: Jared Sulem X-Newsgroups: comp.databases.postgresql.admin Subject: Re: Restricting user access to databases Date: Tue, 24 Apr 2001 14:23:44 +0000 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 25 Message-ID: <3AE58C70.2040503@sulem.freeserve.co.uk> References: <3AE4CB56.6060100@sulem.freeserve.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: scrappy@hub.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; 0.8.1) Gecko/20010323 X-Accept-Language: en To: pgsql-admin@postgresql.org X-Archive-Number: 200104/118 X-Sequence-Number: 1255 Jared Sulem wrote: > Is there anyway to make PostgreSQL automatically only grant access to > databases by their owners, and preferably database superusers, rather > than making lots of pg_hba.conf entries and password files? Just had an idea. Another token could be added to the pg_hba.conf file: 'owner'. Then the line: host all 192.168.3.0 255.255.255.0 password owner Would only allow users that owned the database they were trying to access to login. 'owner' being like a virtual file containing only the owner's name of the database, that the user is trying to access. (Or is there already a way to easily do this?) Jared