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 1rzGzV-002qJq-B9 for pgsql-general@arkaria.postgresql.org; Tue, 23 Apr 2024 14:19:25 +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 1rzGzT-008oIO-M3 for pgsql-general@arkaria.postgresql.org; Tue, 23 Apr 2024 14:19:23 +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 1rzGzT-008oIF-BY for pgsql-general@lists.postgresql.org; Tue, 23 Apr 2024 14:19:23 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rzGzR-002XE1-20 for pgsql-general@lists.postgresql.org; Tue, 23 Apr 2024 14:19:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 43NEJHCG3330173; Tue, 23 Apr 2024 10:19:17 -0400 From: Tom Lane To: "David G. Johnston" cc: Arbol One , "pgsql-general@lists.postgresql.org" Subject: Re: Password forgotten In-reply-to: References: Comments: In-reply-to "David G. Johnston" message dated "Tue, 23 Apr 2024 06:27:00 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3330171.1713881957.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Tue, 23 Apr 2024 10:19:17 -0400 Message-ID: <3330172.1713881957@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Tuesday, April 23, 2024, Arbol One wrote: >> psql-16 asks for the password, which I have forgotten. >> Is there a way I can retrieve this master password? > Nope. You need to login using a method that doesn’t require a password > then change the password. See pg_hba.conf for authentication options. > Usually connecting via local and peer authentication is the default option. If all else fails, shut the server down and start it in single-user mode. That will let you in as a superuser and you can use ALTER USER to reset the role's password. regards, tom lane