Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 7227FB5DBE5 for ; Thu, 18 Aug 2011 10:48:25 -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 04307-10 for ; Thu, 18 Aug 2011 13:48:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mail.postgresql.org (Postfix) with ESMTP id D54CFB5D803 for ; Thu, 18 Aug 2011 10:48:17 -0300 (ADT) X-Originating-IP: 217.70.178.134 Received: from mfilter4-d.gandi.net (mfilter4-d.gandi.net [217.70.178.134]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 15227172092; Thu, 18 Aug 2011 15:48:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter4-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter4-d.gandi.net (mfilter4-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 8r9HPIpkXZ7V; Thu, 18 Aug 2011 15:48:15 +0200 (CEST) X-Originating-IP: 88.164.23.161 Received: from [192.168.0.11] (fb.ioguix.net [88.164.23.161]) (Authenticated sender: jg@derorthais.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id A710C1720AE; Thu, 18 Aug 2011 15:48:14 +0200 (CEST) Message-ID: <4E4D181F.4040001@free.fr> Date: Thu, 18 Aug 2011 15:48:15 +0200 From: "Jehan-Guillaume (ioguix) de Rorthais" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110626 Icedove/3.1.11 MIME-Version: 1.0 To: Tom Browder CC: pgsql-admin@postgresql.org Subject: Re: Unable to login with phppgadmin on a remote host References: <4E4CEC10.4060905@free.fr> <4E4D0771.20001@free.fr> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201108/169 X-Sequence-Number: 38156 On 18/08/2011 15:37, Tom Browder wrote: > On Thu, Aug 18, 2011 at 07:37, Jehan-Guillaume (ioguix) de Rorthais > wrote: >> On 18/08/2011 13:54, Tom Browder wrote: >>> On Thu, Aug 18, 2011 at 05:40, (ioguix) de Rorthais wrote: >>>> On 18/08/2011 01:20, Tom Browder wrote: > ... >>>>> However, I cannot successfully login with phppgadmin on the remote host. >>>>> >>>>> I always get "login failed" whether I use myuser or postgres. >>>> >>>> Do you have errors in your postgresql log files about this connections >>>> attempts ? >>> >>> No, only some sql errors from an early user creation. >> You should have some FATAL or ERROR entries about your attempts to >> connect. That means phpPgAdmin doesn't even reach PostgreSQL. > ... >>>> Please, show us your full pg_hba.conf (without comments and public IP >>>> address). >>> >>> My pg_hba.conf: >>> >>> local all all md5 >>> host all all 127.0.0.1/32 md5 >>> host all all ::1/128 md5 >>> host all admin xx.xxx.xxx.xx/32 md5 >>> host all postgres xx.xxx.xxx.xx/32 md5 >> >> sounds good. >> That means that you did set a password to user postgres ? did you try to >> login with the following commands using your own system user (not postgres): >> >> psql postgres postgres > > That exact command works. > > (Note that I am logged in via ssh onto the remote postgresql host as > my normal system user 'tom'.) > >> psql -h 127.0.0.1 postgres myuser > > That exact command works. make sure you can connect to the "$conf['servers'][0]['defaultdb']" using myuser: psql -h 127.0.0.1 template1 myuser Then, it should work with the following line in your "conf/config.inc.php" using user myuser: $conf['servers'][0]['host'] = '127.0.0.1'; > >> first one use unix socket, second one inet. > > Is there a possibility my postgresql.conf file needs changing to get > good logging? I originally changed no defaults and my system > postgresql start file puts all info into "server.log" in $PGDATA. > > This morning I changed one line in that conf file (and then did a reload): > > #logging_collector = off # Enable capturing of stderr and csvlog > logging_collector = on # Enable capturing of stderr and csvlog with * log_destination = 'stderr' * logging_collector = on You will find your log file in the folder defined in "log_directory" with name set in parameter "log_filename". > > I also checked /var/log/auth.log and see no evidence of login > attempts from my two postgres users except vial local logins. > > Thanks, Jehan-Guillaume. > > -Tom