Re: How to debug authentication issues in Postgres

From: Hemil Ruparel <hemilruparel2002(at)gmail(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to debug authentication issues in Postgres
Date: 2020-11-28 14:10:08
Message-ID: CANW1aT9jugXp_MPXwdq=DNNFszAH5CZke_ewRon3UWn1DRTYZw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Line 88 is this line: host database user 0.0.0.0/0
scram-sha-256.

I might have forgotten to change one of the names in the earlier mails.

On Sat, Nov 28, 2020 at 7:38 PM Hemil Ruparel <hemilruparel2002(at)gmail(dot)com>
wrote:

> I commented out scram-sha-256 lines for IPv4 and IPv6. I still got
> authentication failure. The log output now says:
> FATAL: password authentication failed for user "centos"
> DETAIL: Connection matched pg_hba.conf line 89: "host database
> user 0.0.0.0/0 md5"
>
> On Sat, Nov 28, 2020 at 7:34 PM Hemil Ruparel <hemilruparel2002(at)gmail(dot)com>
> wrote:
>
>> Yes. Password encryption is set to scram-sha-256.
>>
>> On Fri, Nov 27, 2020 at 10:36 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
>> wrote:
>>
>>> On 11/27/20 12:37 AM, Hemil Ruparel wrote:
>>> > The log says:
>>> > > FATAL: password authentication failed for user "centos"
>>> > > DETAIL: Connection matched pg_hba.conf line 88: "host user
>>>
>>> > password 0.0.0.0/0 <http://0.0.0.0/0> scram-sha-256"
>>>
>>> To me that looks like a strange line for pg_hba.conf and I don't see it
>>> in the pg_hba.conf file you sent earlier.
>>>
>>> What is line 88 in your pg_hba.conf?
>>>
>>> >
>>> > I can't understand where is the problem as both psql and pgadmin
>>> connect
>>> > without problems using the same password
>>> >
>>> > On Fri, Nov 27, 2020 at 1:46 PM Hemil Ruparel
>>> > <hemilruparel2002(at)gmail(dot)com <mailto:hemilruparel2002(at)gmail(dot)com>>
>>> wrote:
>>> >
>>> > Sorry. This was the replication section:
>>> > local replication all
>>> peer
>>> > host replication all 127.0.0.1/32 <http://127.0.0.1/32>
>>>
>>> > scram-sha-256
>>> > host replication all ::1/128
>>> > scram-sha-256
>>> >
>>> > On Fri, Nov 27, 2020 at 1:41 PM Laurenz Albe
>>> > <laurenz(dot)albe(at)cybertec(dot)at <mailto:laurenz(dot)albe(at)cybertec(dot)at>>
>>> wrote:
>>> >
>>> > On Fri, 2020-11-27 at 13:34 +0530, Hemil Ruparel wrote:
>>> > > I have restarted postgres quite a few times to try making
>>> > configuration changes and it
>>> > > is always back up. I don't know how. Feels weird to me. I
>>> > didn't add the line
>>> > > "local replication all". It was there by default
>>> >
>>> > I don't believe that.
>>> >
>>> > This is how it looks by default:
>>> >
>>> > # Allow replication connections from localhost, by a user with
>>> the
>>> > # replication privilege.
>>> > local replication all
>>> > trust
>>> > host replication all 127.0.0.1/32 <http://127.0.0.1/32>
>>>
>>> > trust
>>> > host replication all ::1/128
>>> > trust
>>> >
>>> > Yours,
>>> > Laurenz Albe
>>> > --
>>> > Cybertec | https://www.cybertec-postgresql.com
>>> > <https://www.cybertec-postgresql.com>
>>> >
>>>
>>>
>>> --
>>> Adrian Klaver
>>> adrian(dot)klaver(at)aklaver(dot)com
>>>
>>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hemil Ruparel 2020-11-28 14:42:40 Re: How to debug authentication issues in Postgres
Previous Message Hemil Ruparel 2020-11-28 14:08:15 Re: How to debug authentication issues in Postgres