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 1uZYBz-0054iP-TD for pgsql-general@arkaria.postgresql.org; Wed, 09 Jul 2025 17:02:47 +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 1uZYBx-001i4e-Vy for pgsql-general@arkaria.postgresql.org; Wed, 09 Jul 2025 17:02:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uZYBx-001i3I-LP for pgsql-general@lists.postgresql.org; Wed, 09 Jul 2025 17:02:46 +0000 Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uZYBv-006h21-2J for pgsql-general@lists.postgresql.org; Wed, 09 Jul 2025 17:02:45 +0000 Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-3ddb4a7ac19so209665ab.3 for ; Wed, 09 Jul 2025 10:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752080562; x=1752685362; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=bQDiaHvs5LBbGxU7mv4zKDUmOSkXfPm8VCjoEyQzZzQ=; b=LShQ6TbaW1LE6vf/fqfnPk1JuRJXN+3np/DEMFMRnwxN5OfsN3CF5QRhHf1GpTTui2 0CLj2HwCTKjpddZiqa0BdS9BMZLp4q9/QW3TDnJE6qqgQVybf1vg/CmC+EA+crux0yqA YDDLpGlrKbgMKBcxKXdAVXN/l7gJ+x/S7kC5MuEBGA3aQrDshVyc51XJL2i6+UWeeRub C1pygb0We7h3VkwjiO94k/56EcQw4XZQIB1ndIs1DEKlbCSwrJ+Qu6zX4KmZBP7OmyG2 y0vvOTKRmMiqJvTbkw3uFsJocR4g4k66Gdk2KmGFx1SbUNDFKjQnmcnp444V8H6ShLLh kX5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752080562; x=1752685362; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bQDiaHvs5LBbGxU7mv4zKDUmOSkXfPm8VCjoEyQzZzQ=; b=lzHW/Ohu+LpbvLNvIR/AQ8sGMYp8oAArADHmXyXprD7+zcrarJhqwN+j44dPG5PmXv zEu9Cp/+HQOeyJf2EgO5Hs8iBos+yalXooS9qPLcKOGPMyklYGbjWC6ebkO6TNVcNoXD QGK0ALKenaPtG7aSJlAkHHWi4IGV+G3Z7zq9ZAnMref+ga43W4FICzsIE2W1xWUDZxYH Oyujc00vfJ9Bha66/+SHL2Xt5MJELmA73bwXRhrmJJ9OjMIGqlTyBjqNC1ZHdmyX3qxA eUNE47ZTcDxmAa4LcWH5QvJGTCnQbwbPmsxc8/XEd+M8783I2FQHBqj3QQmxlVzljbOk qYtg== X-Gm-Message-State: AOJu0YyzY5H9oc4HNrV2yi4iBmrMg+YK32cYDse+UWaQTm7gRJkfEsIz Btt8kTDrEgm0yeLRYq5/asLqA2KYptfKoyDB+ZCPCPPTB5ch3W05F7L01IwpNLEFqjLlKPQroj+ wybXqd8YQi7siwzvGZFZebt5Fls+lew4nMxXE5oo= X-Gm-Gg: ASbGncsmtPLdHEytMuAnjWphRkpf8fjQuaEzKB6tCHyvZ3jo08w4K8zRlllp8A2dhJj YHwmz7YmISzC/fzZ8bItY3iQKoeZ9OzItAk30z7down6l1Gqftc78pbjaisNKSPXnbom7BBo47r pug33MxkML3tI1edQ2RhsfKf896lG4f0jqylHnuxMxoU971kxPKN8absPodrAKWazocKm4TCS6T Bpbog== X-Google-Smtp-Source: AGHT+IFpchSTZOX22AHbqHpWJ1Jag1ijmEwxSNZppyr/ex6DZJAkSa9rJw9OmB+k1ibivlpsdGZ/rtlh3KGegaAudvk= X-Received: by 2002:a05:6e02:b42:b0:3de:2102:f1d8 with SMTP id e9e14a558f8ab-3e244019ab8mr7765055ab.18.1752080561880; Wed, 09 Jul 2025 10:02:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Greg Sabino Mullane Date: Wed, 9 Jul 2025 13:02:06 -0400 X-Gm-Features: Ac12FXzafYtiRFCgf3ruv0g1eEAIL4cj2JkTES3g_rR6F9wMIot8IM_dLZuhtMQ Message-ID: Subject: Re: Password Encryption and Connection Issues To: =?UTF-8?Q?Alpaslan_AKDA=C4=9E?= Cc: "pgsql-general@lists.postgresql.org" Content-Type: multipart/alternative; boundary="0000000000008246020639820bb4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000008246020639820bb4 Content-Type: text/plain; charset="UTF-8" > Best solution: Upgrade everyone to scram, then change md5 to scram in > pg_hba.conf and never look back. > To expand more on the "upgrade everyone to scram", that means force all users to set a new password while using scram (which should be the default). You can do it yourself by getting a list of users and changing their passwords inside psql: -- List all users still stuck in md5-land: greg=# select rolname from pg_authid where rolpassword ~ '^md5' alice eve mallory (3 rows) -- Just in case, force use of scram greg=# set password_encryption = 'scram-sha-256'; SET -- Reset each user's password to some strong password of your choice: greg=# \password alice Enter new password for user "alice": Enter it again: -- Repeat the above until this query returns no rows: select rolname from pg_authid where rolpassword ~ '^md5' Cheers, Greg -- Crunchy Data - https://www.crunchydata.com Enterprise Postgres Software Products & Tech Support --0000000000008246020639820bb4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Best solution: Upgrade everyone to scram, then change md5 to= scram in pg_hba.conf and never look back.
To expand more on the "upgrade everyone to scram", th= at means force all users to set a new password while using scram (which sho= uld be the default). You can do it yourself by getting a list of users and = changing their passwords inside psql:

-- List all = users still stuck in md5-land:
greg=3D# select=C2=A0rolname=C2=A0= from pg_authid where=C2=A0rolpassword=C2=A0~ '^md5'
alice=
eve
mallory
(3 rows)

-- Just in case, force use of scram
greg=3D# set password_encry= ption =3D 'scram-sha-256';
SET

-= - Reset each user's password to some strong password of your choice:
greg=3D# \password alice
Enter new password for user &quo= t;alice":
Enter it again:

-- Repeat the ab= ove until this query returns no rows:
select=C2=A0rolname=C2= =A0from pg_authid where=C2=A0rolpassword=C2=A0~ '^md5'
<= div>
Cheers,
Greg

--
Enterprise Postgres Software Products &= amp; Tech Support

--0000000000008246020639820bb4--