X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 31B6D40C226 for ; Sun, 30 Jan 2005 23:12:54 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43998-03 for ; Sun, 30 Jan 2005 23:12:44 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by svr1.postgresql.org (Postfix) with ESMTP id 3FFC940C0DF for ; Sun, 30 Jan 2005 23:11:15 +0000 (GMT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.13.1/8.13.1) with ESMTP id j0UNBCra083328 for ; Sun, 30 Jan 2005 23:11:12 GMT (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.13.1/8.13.1/Submit) id j0UMt6af080457 for pgsql-admin@postgresql.org; Sun, 30 Jan 2005 22:55:06 GMT (envelope-from news) From: stig erikson X-Newsgroups: pgsql.admin Subject: Re: Help with access control settings in pg_hba.conf -- AAAARGH! Date: Sun, 30 Jan 2005 23:55:03 +0100 Organization: Hub.Org Networking Services Lines: 57 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6) Gecko/20050111 X-Accept-Language: en-us, en, sv, nn, nb, no, pl In-Reply-To: X-Enigmail-Version: 0.89.6.0 X-Enigmail-Supports: pgp-inline, pgp-mime To: pgsql-admin@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.586 tagged_above=0 required=5 tests=HOT_NASTY X-Spam-Level: X-Archive-Number: 200502/1 X-Sequence-Number: 16169 Victor Danilchenko wrote: > Hi, > > I am trying to set up a database server with multiple DB > clusters, so that in each cluster a number of users have their own > database each, with passwordless access (we can trust the network > security in our installation). The following is what seems like it > *should* work: > > host all all 127.0.0.1 255.255.255.255 password > host sameuser all xxx.xxx.xxx.0 255.255.255.128 ident sameuser > host all @fac xxx.xxx.xxx.0 255.255.255.128 trust > > The second line ("host sameuser") is the problem. It doesn't > work -- when tryign to connect, I keep getting error messages: > > $ whoami > testuser > $ psql -h db-edlab -p 7666 testuser testuser > psql: FATAL: IDENT authentication failed for user "testuser" > > If I replace 'ident sameuser' with 'trust' there, it works fine > -- but then any user can access anyone else's database, providing they > request the same password. you need to read the manual to understand what same user does/does not. > > The idea is that each user should be able to access only their > database, only as themselves, without password -- but I can't figure out > what I am doing wrong. Any help? if what I am trying to do is > impossible, is there any other way to achieve such a goal -- i.e. > passwordless access that allows each user to access only their own > database over the network? > have not had the need for this, but i guess that the sql-commands GRANT and/or REVOKE can be of help, look in the manual. > > BTW, as long as I am writing, a somewhat related question, which > is not nearly as important as the previous one. > > I launch multiple postmatser processes, each servicing a > dedicated DB cluster on a dedicated port. The problem is that I only > ever see *one* local UNIX socket (/tmp/.s.PGSQL.) file. > There is a .lock file created corresponding to each server/port combo, > but it looks like each subsequent instance of the postmaster kills the > previous instance's UNIX socket. Is this how it should be -- and if so, > are there any pg_ctl options I can pass in to make it simply not create > the UNIX sockets altogether, so that only network operations are > supported? AT the moment, I am doing admin access though the loopback > device, so it's not a big issue. >