Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 14F146331FD for ; Sun, 28 Mar 2010 22:17:50 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 96725-02 for ; Mon, 29 Mar 2010 01:17:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f187.google.com (mail-iw0-f187.google.com [209.85.223.187]) by mail.postgresql.org (Postfix) with ESMTP id EC4BC632EF5 for ; Sun, 28 Mar 2010 22:17:38 -0300 (ADT) Received: by iwn17 with SMTP id 17so6211979iwn.19 for ; Sun, 28 Mar 2010 18:17:37 -0700 (PDT) Received: by 10.231.174.140 with SMTP id t12mr2184064ibz.89.1269825457078; Sun, 28 Mar 2010 18:17:37 -0700 (PDT) Received: from [192.168.1.254] ([121.246.205.20]) by mx.google.com with ESMTPS id cm22sm3435145ibb.11.2010.03.28.18.17.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Mar 2010 18:17:36 -0700 (PDT) Message-ID: <4BAFFFAC.9050505@itech7.com> Date: Mon, 29 Mar 2010 06:47:32 +0530 From: Nilesh Govindarajan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100301 Shredder/3.0.3 MIME-Version: 1.0 To: Guillaume Lelarge CC: pgsql-admin@postgresql.org Subject: Re: Socket & TCP connections References: <4BAF8DA9.2010000@itech7.com> <4BAFC871.4040609@lelarge.info> In-Reply-To: <4BAFC871.4040609@lelarge.info> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/216 X-Sequence-Number: 34015 On 03/29/2010 02:51 AM, Guillaume Lelarge wrote: > Le 28/03/2010 19:11, Nilesh Govindarajan a écrit : >> [...] >> I'm trying to setup PostgreSQL so that, it will not ask password when >> connected locally (socket) whereas it will ask when connected using >> TCP/IP. This should apply ONLY to root account. But this is not working - >> >> local all root trust >> local all all md5 >> # IPv4 local connections: >> #host all root 127.0.0.1/32 trust >> #host all root ::1/128 trust >> host all all 127.0.0.1/32 md5 >> host all all ::1/128 md5 >> >> I cannot give passwordless access to TCP/IP because then it will become >> a big security hole using PhpPgAdmin exposed to the public. >> > > Could you be more specific on what's not working? the exact error > message would be a great help. BTW, your settings are good for local > access, but you only allow localhost TCP/IP access. > > There's no error message as such. It doesn't do what is expected - should not ask passwords for localhost. If I connect as psql -U root -d postgres -h localhost, it still asks me for password. -- Nilesh Govindarajan Site & Server Administrator www.itech7.com मेरा भारत महान ! मम भारत: महत्तम भवतु !