Received: from mail12.svr.pol.co.uk (mail12.svr.pol.co.uk [195.92.193.215]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f3ODVx317057 for ; Tue, 24 Apr 2001 09:32:00 -0400 (EDT) (envelope-from jsulem@sulem.freeserve.co.uk) Received: from modem-138.picasso-trigger.dialup.pol.co.uk ([62.136.219.138] helo=tauron.sulem) by mail12.svr.pol.co.uk with esmtp (Exim 3.13 #0) id 14s2v5-0001Wc-00 for pgsql-admin@postgresql.org; Tue, 24 Apr 2001 14:31:55 +0100 Received: from sulem.freeserve.co.uk (jazz.sulem [192.168.3.17]) by tauron.sulem (8.9.3/8.8.7) with ESMTP id OAA04540 for ; Tue, 24 Apr 2001 14:34:40 +0100 Message-ID: <3AE58E8D.4090209@sulem.freeserve.co.uk> Date: Tue, 24 Apr 2001 14:32:45 +0000 From: Jared Sulem User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; 0.8.1) Gecko/20010323 X-Accept-Language: en MIME-Version: 1.0 To: PostgreSQL Admin List Subject: Re: Restricting user access to databases References: <3AE4CB56.6060100@sulem.freeserve.co.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200104/119 X-Sequence-Number: 1256 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 a line like: 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