From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Raivo Rebane <raivore55@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: How to behive if I remove password from postgres role
Date: Wed, 15 Mar 2023 09:12:11 -0700
Message-ID: <aa604dc4-16d1-ce5c-ce35-f0c15fa1b6ed@aklaver.com> (raw)
In-Reply-To: <CAMH5fptfyfH=WpvLg+aX1XacDJEe8Tpz7gk+LGhJSp7kVVT7eA@mail.gmail.com>
References: <CAMH5fptfyfH=WpvLg+aX1XacDJEe8Tpz7gk+LGhJSp7kVVT7eA@mail.gmail.com>
On 3/15/23 09:02, Raivo Rebane wrote:
> HI
>
> I wanted to install PostGIS Bundle so that it builds a sample spatial
> database, but got error - createdb: error: connection to server at
> "localhost" (::1), port 5432 failed: FATAL: password authentication
> failed for user "postgres"
> Then I altered role of postgres so, that password = NULL.
> Now I am in situation that I can't run any postgres command.
> What I must to do ?
Edit the
pg_hba.conf(https://www.postgresql.org/docs/15/auth-pg-hba-conf.html) so
that the first local line is set to trust as in the 'Example 21.1.
Example pg_hba.conf Entries' at the bottom of the file. It may already
be set that way.
In either case when you connect do not use a host setting e.g. do not do
host=localhost. This will ensure you are connecting to the local socket
instead and will be using the trust authentication method and not a
password. Once you are in you can alter the postgres user to have a
proper password.
>
> Regards,
> Raivo
>
>
--
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, raivore55@gmail.com
Subject: Re: How to behive if I remove password from postgres role
In-Reply-To: <aa604dc4-16d1-ce5c-ce35-f0c15fa1b6ed@aklaver.com>
References: <CAMH5fptfyfH=WpvLg+aX1XacDJEe8Tpz7gk+LGhJSp7kVVT7eA@mail.gmail.com> <aa604dc4-16d1-ce5c-ce35-f0c15fa1b6ed@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