Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlPX4-002fqT-M6 for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Sep 2023 08:04:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qlPX3-001OOt-CO for pgsql-bugs@arkaria.postgresql.org; Wed, 27 Sep 2023 08:04:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlPX3-001OOU-3C for pgsql-bugs@lists.postgresql.org; Wed, 27 Sep 2023 08:04:29 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qlPX0-006t8d-LV for pgsql-bugs@lists.postgresql.org; Wed, 27 Sep 2023 08:04:27 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-405497850dbso85422145e9.0 for ; Wed, 27 Sep 2023 01:04:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20230601.gappssmtp.com; s=20230601; t=1695801865; x=1696406665; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=rqCgt5+OWY9RcZvzP0MMxlNCBR7M9eZL6KJdhtdpAhw=; b=P7Qu5Hw5bhoNx9P/stTltvsFiBMDAohPa11Gi/3dqm635BltBEp/zXFtt4YBe3wJdh i7QY8SdRIa+UXLSD7RhEyGYCP8HzN/zvSJTL7Ghka7XqojhLyrAottCvUEHng/GbCjSE OTMQYolA6DI6v1AhzYtL4CQnhH5eALnbXBeRavASqq0lN63h+50Zwb4v59d6t6sw/tFg ycqMQcfNYo2SPTmtHReKfSbWm5IDU67pHGcnQcebH5BupHa/77w+qDtpS144Yoe9T9Rd Gz0eEPL+mfL9yheeQTTjBpsOSJoWwSl/j/HvPleM6lfp0jmKfLpJ/fwy3CEyGXJt4LJD igiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695801865; x=1696406665; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=rqCgt5+OWY9RcZvzP0MMxlNCBR7M9eZL6KJdhtdpAhw=; b=rBMS2bSF8ny2v9u3i/F0yi+wScRfoVCwefPk44ybEUXrajoUHyQYDgeMKNb9h37u2O 0oKMURLZUOsnQ/R46qPNF41pHmjVJ1qiAhskhjLSFHn2OPKxBr20/ydhULAlm9d3PAhr gHRSsf/RqJmYYEhUtuN1dIx30OoNsY4nGH4W6SoeJru9s3fFXTPG0vQWIXHcdnBjPjAT WcB4KQkozck9qScMd0riMYuMWjhuK3vIYw0nnkB7n62OqgWq0ovwLz9XrDdVt/US6bg7 D1S45qyPEXidujKGRY2sGuV97L8COW/UVjb+lTViTtaRxLB0HJvvpH9o7vWCdfi8KTtU x6Ew== X-Gm-Message-State: AOJu0YyZDiVSeKHOthfsKLN7lltVnuO1jE6nUF/hbc9lMqB7o/Zg6fXV tEuDcsuqyyYCUyH16j2qToudiA== X-Google-Smtp-Source: AGHT+IHcgQBLqbSTRRiLjA0IUHNnnU2VS+Nzf/hnkJJbliIcm3kzoi0c58B7tXmLKq9or00fIskAUg== X-Received: by 2002:adf:f24c:0:b0:31f:eb6a:c824 with SMTP id b12-20020adff24c000000b0031feb6ac824mr1066214wrp.10.1695801865158; Wed, 27 Sep 2023 01:04:25 -0700 (PDT) Received: from localhost.localdomain (178-190-177-111.adsl.highway.telekom.at. [178.190.177.111]) by smtp.gmail.com with ESMTPSA id bv19-20020a0560001f1300b0032327b70ef6sm7831889wrb.70.2023.09.27.01.04.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 01:04:24 -0700 (PDT) Message-ID: <01fbb3d2f280a7691ae6e563870c00d19fadb02e.camel@cybertec.at> Subject: Re: md5 password valid and invalid after upgrading From: Laurenz Albe To: Kyle MacMillan , pgsql-bugs@lists.postgresql.org Date: Wed, 27 Sep 2023 10:04:24 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 2023-09-26 at 19:14 -0400, Kyle MacMillan wrote: > Issue: > Unable to log into database with md5 password, only after upgrading remot= e system's psql version. >=20 > Error: > psql: error: connection to server at... failed: fe_sendauth: error sendin= g password authentication >=20 > Steps: > =C2=A0=C2=A0=C2=A01. Setup Postgres 11.17 with an MD5 password > =C2=A0=C2=A0=C2=A02. Access the DB from a remote system that only has psq= l 9.6=C2=A0 > =C2=A0=C2=A0=C2=A03. Upgrade DB to Postgres15.x=C2=A0 > =C2=A0=C2=A0=C2=A04. Log into database using psql 9.6 and the original pa= ssword > =C2=A0=C2=A0=C2=A05. Observe no issues > =C2=A0=C2=A0=C2=A06. Upgrade psql on remote system to 14.x > =C2=A0=C2=A0=C2=A07. 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 store= d as SHA256. > I am not using boolean-like values for my current password.=20 >=20 > psql14 does not appear to recognize that it needs to use md5 but psql9 do= esn'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