From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Pedro Gonçalves <zensalves@hotmail.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: DBeaver postgres localhost access
Date: Mon, 22 May 2023 08:44:46 -0700
Message-ID: <fedb9aaa-c996-79ed-e93d-f7f52574f157@aklaver.com> (raw)
In-Reply-To: <AM7PR10MB3954B84ABA569915AA1DAD6BA07D9@AM7PR10MB3954.EURPRD10.PROD.OUTLOOK.COM>
References: <AM7PR10MB3954B84ABA569915AA1DAD6BA07D9@AM7PR10MB3954.EURPRD10.PROD.OUTLOOK.COM>
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 <db_name> -U <user_name> -p <port_no>
Once you are connected you can use ALTER USER <user_name> WITH PASSWORD
'some_pwd';
This assumes the <user_name> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, zensalves@hotmail.com
Subject: Re: DBeaver postgres localhost access
In-Reply-To: <fedb9aaa-c996-79ed-e93d-f7f52574f157@aklaver.com>
References: <AM7PR10MB3954B84ABA569915AA1DAD6BA07D9@AM7PR10MB3954.EURPRD10.PROD.OUTLOOK.COM> <fedb9aaa-c996-79ed-e93d-f7f52574f157@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox