From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Gopi G <gopiputty@gmail.com>
To: Francis Santiago <santiagocfc@gmail.com>
Cc: Pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: how do i change the password for 'postgres' user
Date: Mon, 26 Feb 2018 09:30:27 +0100
Message-ID: <1519633827.2714.6.camel@cybertec.at> (raw)
In-Reply-To: <CAC9HVwkwBPZiuJcM1KjQahH=cN8Q9xexRhrsvrZrBOvWcKnX=A@mail.gmail.com>
References: <CAC9HVwmbzYXdPixFzRwmEVe0XJhw5OTtxHrv2BcTEM3UDX77=g@mail.gmail.com>
<CAGrKvM8KPxrMY+=DwP9ccW7bDsP9mV6980uwiRGfbqN2vymNWA@mail.gmail.com>
<CAC9HVwkwBPZiuJcM1KjQahH=cN8Q9xexRhrsvrZrBOvWcKnX=A@mail.gmail.com>
Gopi G wrote:
> On Sat, Feb 24, 2018 at 6:48 AM, Francis Santiago <santiagocfc@gmail.com> wrote:
>
> > you entered as the Postgres user, it seems that not because he says : postgres=>
> >
> > When you enter with the postgres user, it is: postgres=#
> >
> > 2018-02-23 20:26 GMT-03:00 Gopi G <gopiputty@gmail.com>:
> > > I have postgres 9.2 running in AWS EC2 (aws linux) instance.
> > > I followed documentation and tried to do
> > > postgres=> ALTER USER Postgres WITH PASSWORD 'password';
> > > ERROR: must be superuser to alter replication users
> > >
> > >
> > > surprisingly I am not finding any way to solve this problem.
> > > and how do I login using 'postgres' linux os user that is created when I installed postgres 9.2?
> > >
> > > gopi
> >
> I did login like postgres.
> Here is from my command:
>
> ~$ sudo -u postgres psql postgres
> could not change directory to "/home/ec2-user"
> Password:
> psql (9.2.24)
> Type "help" for help.
>
> postgres=>
Check \du in psql to see if you have any superusers left.
If not, you must stop the server and start it in single user mode
(postgres --single -D /data/directory dbname).
Once you are connected as superuser or in single user mode,
give "postgres" its superuser privilege back:
ALTER ROLE postgres SUPERUSER;
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: laurenz.albe@cybertec.at, gopiputty@gmail.com, santiagocfc@gmail.com
Subject: Re: how do i change the password for 'postgres' user
In-Reply-To: <1519633827.2714.6.camel@cybertec.at>
* 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