Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VzphY-0007O8-Td for pgsql-general@arkaria.postgresql.org; Sun, 05 Jan 2014 15:33:21 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VzphY-0001jc-3W for pgsql-general@arkaria.postgresql.org; Sun, 05 Jan 2014 15:33:20 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VzphW-0001jT-I7 for pgsql-general@postgresql.org; Sun, 05 Jan 2014 15:33:18 +0000 Received: from mail-pb0-x22c.google.com ([2607:f8b0:400e:c01::22c]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VzphT-00036m-LG for pgsql-general@postgresql.org; Sun, 05 Jan 2014 15:33:18 +0000 Received: by mail-pb0-f44.google.com with SMTP id rq2so17482330pbb.31 for ; Sun, 05 Jan 2014 07:33:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=o1XAFG948G9p0uBIt2foclog35JMoq671FQ8uwOJGwE=; b=nQ2GyLPDxuNbZyHl6eSUgTB4W6NgCUeWA6E7x8VKboxsOiE6KpQks1mjJBZtyqVacH KkReh7S6ClD3SfVmBOG2NQV/QkkZCUEA0vhnRH1dO7fmgNMBvB+2/r2yokXU4DVHhRHp VDZj5AwR1X3psUQOcKWRfRbVoTf383K5JCkp+P64o6HJzbm6I2K+lwmSEBTUFMqFl29I Igqpb6dPFRtf9M3aLuhGzY5PU98SqcVd4k9Hwg2Fj8fpRSH13xVf8MFcwbXp8akFskTa 8muQgdIZ9NEXkbGRq1wh+XqFRjtueY2GDRHdm2xfVVhvG/r3ecmkq7j8TMUMlFAM6I28 7TKQ== X-Received: by 10.68.190.33 with SMTP id gn1mr116931248pbc.48.1388935994235; Sun, 05 Jan 2014 07:33:14 -0800 (PST) Received: from panda.site (174-21-132-251.tukw.qwest.net. [174.21.132.251]) by mx.google.com with ESMTPSA id qf7sm160607163pac.14.2014.01.05.07.33.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 05 Jan 2014 07:33:13 -0800 (PST) Message-ID: <52C97B38.8010402@gmail.com> Date: Sun, 05 Jan 2014 07:33:12 -0800 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Jayadevan M CC: Tom Lane , dinesh kumar , "pgsql-general@postgresql.org" Subject: Re: authentication failure References: <52C6C8EE.7060207@gmail.com> <9602.1388761635@sss.pgh.pa.us> <52C8252C.5050602@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org On 01/04/2014 08:46 PM, Jayadevan M wrote: > Log entries for 3 situations - 2 successful and one failed attempt - > > From non-chroot, shell user postgres > > 2014-01-05 10:11:58 IST [17008]: [2-1] user=postgres,db=postgres LOG: > connection authorized: user=postgres database=postgres > 2014-01-05 10:12:03 IST [17008]: [3-1] user=postgres,db=postgres LOG: > disconnection: session time: 0:00:04.413 user=postgres database=postgres > host=::1 port=47944 > > > From chroot, shell user root, db user postgres > 2014-01-05 10:12:18 IST [17021]: [1-1] user=[unknown],db=[unknown] LOG: > connection received: host=::1 port=47945 > 2014-01-05 10:12:18 IST [17022]: [1-1] user=[unknown],db=[unknown] LOG: > connection received: host=::1 port=47946 > 2014-01-05 10:12:18 IST [17022]: [2-1] user=postgres,db=postgres FATAL: > password authentication failed for user "postgres" > 2014-01-05 10:12:18 IST [17022]: [3-1] user=postgres,db=postgres > DETAIL: Connection matched pg_hba.conf line 90: "host > all all ::1/128 md5" > Alright so it (psql I assume) makes the connection but is failing when the password is supplied. That would point to an erroneous password being supplied from the root shell. This would seem to mean there is a ~/.pgpass file with an incorrect value or a PGPASSWORD environment variable with an incorrect value. There is also the possibility that PGPASSFILE was set to point to a file other than .pgpass. To confirm that it is a password issue you could temporarily change the pg_hba.conf line above to trust and attempt the connection to see if it succeeds. > > chroot, shell user postgres > > 2014-01-05 10:12:48 IST [17051]: [1-1] user=[unknown],db=[unknown] LOG: > connection received: host=::1 port=47948 > 2014-01-05 10:12:51 IST [17052]: [1-1] user=[unknown],db=[unknown] LOG: > connection received: host=::1 port=47949 > 2014-01-05 10:12:51 IST [17052]: [2-1] user=postgres,db=postgres LOG: > connection authorized: user=postgres database=postgres > > -- Adrian Klaver adrian.klaver@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general