Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 88059B5DC4F for ; Wed, 17 Aug 2011 21:17:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 18140-03 for ; Thu, 18 Aug 2011 00:17:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com [209.85.216.46]) by mail.postgresql.org (Postfix) with ESMTP id AF9A0B5DCF1 for ; Wed, 17 Aug 2011 21:14:18 -0300 (ADT) Received: by qwk3 with SMTP id 3so914334qwk.19 for ; Wed, 17 Aug 2011 17:14:18 -0700 (PDT) Received: by 10.224.109.3 with SMTP id h3mr81047qap.36.1313626458189; Wed, 17 Aug 2011 17:14:18 -0700 (PDT) Received: from [10.1.1.8] (124-169-181-228.dyn.iinet.net.au [124.169.181.228]) by mx.google.com with ESMTPS id cg10sm1142703qab.8.2011.08.17.17.14.16 (version=SSLv3 cipher=OTHER); Wed, 17 Aug 2011 17:14:17 -0700 (PDT) Message-ID: <4E4C5952.3010204@ringerc.id.au> Date: Thu, 18 Aug 2011 08:14:10 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Tom Browder CC: pgsql-admin@postgresql.org Subject: Re: Unable to login with phppgadmin on a remote host References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/158 X-Sequence-Number: 38145 On 18/08/2011 7:20 AM, Tom Browder wrote: > I have installed postgresql 9.0.4 from source on aUbuntu 10.04 LTS > 64-bit remote host. > > I have installed phppgadmin, Apache2, and other required programs and > libraries via the Ubuntu package manager. > > I have successfully created the user posgtres, executed initdb > successfully, and can execute pqsql to connect to template1, all while > logged in via ssh onto the remote host > > I have set postgresql to listen on all. > > I have these lines in my pg_hba.conf file: > > host all myuser/32 md5 > host all postgres/32 md5 > > However, I cannot successfully login with phppgadmin on the remote host. Given the config you showed, that *should* work. Did you restart apache after altering your phppgadmin config? It's usually best to have phppgadmin (or whatever) connect to 127.0.0.1 for localhost, rather than the public IP address anyway. I'd recommend letting phppgadmin connect to localhost (127.0.0.1/32) and setting that to md5 auth in pg_hba.conf . Most web-based database apps don't work well with "ident" authentication because they're all running under the apache or www-data user, so you'll need to add a like for the database(s) and user(s) of interest that specifies md5 auth. For example, if your admin app uses the "postgres" user and you want it to access all databases: host all postgres 127.0.0.1/32 md5 (or the "local" clause instead if your app uses a unix socket). Personally I wish Pg would permit the client to use md5 auth when ident fails - support something like "ident_or_md5" as an authmode. That'd solve a lot of usability issues for new admins around configuring auth. -- Craig Ringer