Re: authentication failure

From: Jayadevan M <maymala(dot)jayadevan(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, dinesh kumar <dineshkumar02(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: authentication failure
Date: 2014-01-05 04:46:34
Message-ID: CAFS1N4hnYkGW4ynUe+APcRSG0APe+aXytyVKH8zSgZ6ezA+zRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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"

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

On Sat, Jan 4, 2014 at 8:43 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>wrote:

> On 01/03/2014 09:29 PM, Jayadevan M wrote:
>
>> There is only one instance -
>>
>> ps -eaf | grep bin/postgres | grep -v grep
>> postgres 3203 1 0 2013 ? 00:02:04
>> /usr/pgsql-9.3/bin/postgres
>>
>> The basic checks I did -
>> Connectivity from other machines work (so server is accessible)
>> No .pgpass file in the system
>> Able to login as postgres and application users from the same system (as
>> long as it is not from the chroot environment). So this is not a
>> show-stopper- I am able to work and application is also working fine
>> Even in the chroot, as I mentioned, once I do a 'su - postgres', I am
>> able to login.
>>
>
> So, if when you are in the chroot environment what user(s) fail to log in
> and are they the same user(s) as outside the chroot?
>
>
>
>> Overall, it is just a minor inconvenience, but I would like to resolve
>> this. The no password supplied message comes back so fast, it is as if
>> it did not even attemp to connect.
>>
>
> Well, per Toms suggestion you will need to look at the Postgres log file
> to see from the servers perspective.
>
> Also, in case there is third party program involved it would not hurt to
> tail the system log during your connection attempts.
>
>
>>
>>
>>
>>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sameer Kumar 2014-01-05 07:43:17 Re: authentication failure
Previous Message Adrian Klaver 2014-01-05 01:08:07 Re: file system level backup