Re: How to debug authentication issues in Postgres - Mailing list pgsql-general

From Hemil Ruparel
Subject Re: How to debug authentication issues in Postgres
Date
Msg-id CANW1aT-LgHx+CnqimFUomNczq5RugHFL2bwVU=gz9eEcz_W_4A@mail.gmail.com
Whole thread Raw
In response to AW: How to debug authentication issues in Postgres  ("Zwettler Markus (OIZ)" <Markus.Zwettler@zuerich.ch>)
Responses Re: How to debug authentication issues in Postgres  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
I don't quite get what you mean by upgrading to scram-sha256. I installed postgres 13. I haven't upgraded anything yet.

On Fri, Nov 27, 2020 at 8:06 PM Zwettler Markus (OIZ) <Markus.Zwettler@zuerich.ch> wrote:

Did you correctly upgrade your whole environment to scram-sha-256?

 

 

<quote>
To upgrade an existing installation from md5 to scram-sha-256, after having ensured that all client libraries in use are new enough to support SCRAM, set password_encryption = 'scram-sha-256' in postgresql.conf, make all users set new passwords, and change the authentication method specifications in pg_hba.conf to scram-sha-256.

</quote>

 

 

-Markus

 

 

 

Von: Hemil Ruparel <hemilruparel2002@gmail.com>
Gesendet: Freitag, 27. November 2020 09:38
An: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Betreff: Re: How to debug authentication issues in Postgres

 

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               scram-sha-256"

 

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@gmail.com> wrote:

Sorry. This was the replication section:

local   replication     all                                     peer
host    replication     all             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.albe@cybertec.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            trust
host    replication     all             ::1/128                 trust

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

pgsql-general by date:

Previous
From: Gustavsson Mikael
Date:
Subject: SV: Problem with pg_notify / listen
Next
From: Alvaro Herrera
Date:
Subject: Re: Deleting takes days, should I add some index?