Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q17iV-0007Xr-Mj for pgsql-general@arkaria.postgresql.org; Mon, 22 May 2023 15:44:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1q17iU-0002hi-8S for pgsql-general@arkaria.postgresql.org; Mon, 22 May 2023 15:44:58 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q17iT-0002hY-U6 for pgsql-general@lists.postgresql.org; Mon, 22 May 2023 15:44:57 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1q17iM-001Ebo-Fg for pgsql-general@lists.postgresql.org; Mon, 22 May 2023 15:44:56 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 9873D320095A; Mon, 22 May 2023 11:44:48 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 22 May 2023 11:44:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1684770288; x=1684856688; bh=o+O/4xeNArHbLfU2bcSziYZh4giwqfrz+c1 fX7S+boA=; b=dSoYu1zEGNmq/apALQnbYHhOgGnJSisoUCN8w6rAe3qCG1b7Oaq MlLuHdh6Fckmi9HFZmJm1c+ikTc3I4zaOy9xoY1jKyPcvKxQlnv6lIxH5hzDe6fS DnFTttHGqth6+RkjknzT2d2lwupm6QVOj+FSxOSFX23tHapzEAVnex2ofGFg9BWG b4cJJ9BJy4VSrJumeeRvE6MkIQ0A5hA6DvaoAaagftjfrLFRKNo23aE3xLlJTyn/ XQiOp9M9pqtFpXrg10fFOTwqH9sOjI2G0XFDDtEYKCBb5UsHoEhhv/7ioJJ8IT1X 93PzdhLQpiCODfxRNskc2VrYWbx9vNXdDCQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1684770288; x= 1684856688; bh=o+O/4xeNArHbLfU2bcSziYZh4giwqfrz+c1fX7S+boA=; b=Z xJkYddYhJfvdJ8I5srs3xHsQGOoxudcBDoEhXIrv0n9jq2QcysOICJoi2OJcTKUL MMWNgtiW8VSLx57KAnuoXSG+amjfsjdRNJmFCtqxFRP/wnsxa8rxjjBgWJMNSbj8 OJvycObbwIWNshVQnIHskrz4FdQEf5Nfh/XDUXhbblJjYpE/tw1RDp1MTC6UYCrm yGpuhq1rmmcyCMh3Jhf6iMKFKyNpc6RyaXVP//o0i8Af0A6GTbu/bIsWtKtaRMlQ 29XsoqHKc+fdi6yrdvA02jKXR0ZzQWesAMv4pQUyMBOzjwbp3gSNy1dyeDdGi1Vj 3Vup9TYaBoxislHCh+BSQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejuddgkedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepleekgeejhf ekteehfeduveetheeivdduheekudelteefvdffueehtddvgedtfeefnecuffhomhgrihhn pehpohhsthhgrhgvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgt ohhm X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 May 2023 11:44:47 -0400 (EDT) Message-ID: Date: Mon, 22 May 2023 08:44:46 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: DBeaver postgres localhost access Content-Language: en-US To: =?UTF-8?Q?Pedro_Gon=c3=a7alves?= , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 5/20/23 07:09, Pedro Gonçalves wrote: > Hi. > > Good afternoon. > > I’m having dificulties with localhost DBeaver postgres training account. > > Had access to it and changed password, that presently don’t remember. > > What can I do to get access again? > > From DBeaver I was told to address this request to PostgreSQL. 1) Find the pg_hba.conf file for the server and change the auth method to trust for local connections, where local means socket connection. This is shown in example here: https://www.postgresql.org/docs/current/auth-pg-hba-conf.html Example 21.1. Example pg_hba.conf Entries. 2) Reload/restart server 3) Using psql connect with psql -d -U -p Once you are connected you can use ALTER USER WITH PASSWORD 'some_pwd'; This assumes the you connect as has sufficient privileges to do the the ALTER. One way to ensure that is use the postgres user. 4) Once you have a new password set and shown to work then decide whether you want local to remain set at trust or change it to something more secure. If you change it then you will need to repeat 2). > > Kind Regards, > > Pedro Gonçalves > -- Adrian Klaver adrian.klaver@aklaver.com