Re: md5 password valid and invalid after upgrading

From: Kyle MacMillan <macattackftw(at)gmail(dot)com>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: md5 password valid and invalid after upgrading
Date: 2023-09-27 19:26:09
Message-ID: CACW=iPvGe0Woqp4JBa_prQ5eZdCTzQki=0jmiy1+X=Ukcf4AyA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi Laurenz,

Here's the connection method:
psql -h <url> -d <database>

I'm then prompted for a password and enter the password.

And the error:
psql: error: connection to server at <redacted> failed: fe_sendauth: error
sending password authentication

This same procedure worked before the upgrade to psql 14.8 on the remote
machine. This method of connection still works on my other environment that
is still using psql 9.6 on the remote machine/client with Postgres 15.3 on
the server.

SSL is enabled.

Thank you,
Kyle

On Wed, Sep 27, 2023 at 4:04 AM Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
wrote:

> On Tue, 2023-09-26 at 19:14 -0400, Kyle MacMillan wrote:
> > Issue:
> > Unable to log into database with md5 password, only after upgrading
> remote system's psql version.
> >
> > Error:
> > psql: error: connection to server at... failed: fe_sendauth: error
> sending password authentication
> >
> > Steps:
> > 1. Setup Postgres 11.17 with an MD5 password
> > 2. Access the DB from a remote system that only has psql 9.6
> > 3. Upgrade DB to Postgres15.x
> > 4. Log into database using psql 9.6 and the original password
> > 5. Observe no issues
> > 6. Upgrade psql on remote system to 14.x
> > 7. Attempt to log in and see an error
> > The documentation regarding Postgres 14 does not specify the old
> password will not work.
> > It specifies the default was changed and that new passwords will be
> stored as SHA256.
> > I am not using boolean-like values for my current password.
> >
> > psql14 does not appear to recognize that it needs to use md5 but psql9
> doesn't know any better, so it works.
>
> Are you sure that there is no additional error message like "out of memory"
> or "could not encrypt password"? Was step 4 executed on the remote system
> that was later upgraded (so that we can rule out network problems etc.)?
> Is SSL enabled on the server?
>
> Yours,
> Laurenz Albe
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2023-09-27 20:45:51 Re: Memory leak on subquery as scalar operand
Previous Message PG Bug reporting form 2023-09-27 15:04:55 BUG #18136: lc_messages is the empty string but should be 'C'?