pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedhow do i change the password for 'postgres' user
5+ messages / 4 participants
[nested] [flat]
* how do i change the password for 'postgres' user
@ 2018-02-23 23:26 Gopi G <gopiputty@gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Gopi G @ 2018-02-23 23:26 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: how do i change the password for 'postgres' user
@ 2018-02-24 14:48 Francis Santiago <santiagocfc@gmail.com>
parent: Gopi G <gopiputty@gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: Francis Santiago @ 2018-02-24 14:48 UTC (permalink / raw)
To: Gopi G <gopiputty@gmail.com>; +Cc: pgsql-admin
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
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: how do i change the password for 'postgres' user
@ 2018-02-25 05:19 Gopi G <gopiputty@gmail.com>
parent: Francis Santiago <santiagocfc@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Gopi G @ 2018-02-25 05:19 UTC (permalink / raw)
To: Francis Santiago <santiagocfc@gmail.com>; +Cc: pgsql-admin
Hi Francis
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=>
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
>>
>
>
>
>
>
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: how do i change the password for 'postgres' user
@ 2018-02-25 05:34 David G. Johnston <david.g.johnston@gmail.com>
parent: Gopi G <gopiputty@gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: David G. Johnston @ 2018-02-25 05:34 UTC (permalink / raw)
To: Gopi G <gopiputty@gmail.com>; +Cc: pgsql-admin
On Friday, February 23, 2018, Gopi G <gopiputty@gmail.com> wrote:
> 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
>
>
Something is odd here besides using an out-of-support version of
PostgreSQL. I'm figuring that you'll have better luck asking your distro
packager (i.e., Amazon) directly. That said the best way to change
passwords with psql is the \password meta-command.
Most packages make the postgres user a superuser but apparently your distro
thinks differently and you need to learn from them how things work.
David J.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: how do i change the password for 'postgres' user
@ 2018-02-26 08:30 Laurenz Albe <laurenz.albe@cybertec.at>
parent: Gopi G <gopiputty@gmail.com>
0 siblings, 0 replies; 5+ messages in thread
From: Laurenz Albe @ 2018-02-26 08:30 UTC (permalink / raw)
To: Gopi G <gopiputty@gmail.com>; Francis Santiago <santiagocfc@gmail.com>; +Cc: pgsql-admin
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
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2018-02-26 08:30 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23 23:26 how do i change the password for 'postgres' user Gopi G <gopiputty@gmail.com>
2018-02-24 14:48 ` Francis Santiago <santiagocfc@gmail.com>
2018-02-25 05:19 ` Gopi G <gopiputty@gmail.com>
2018-02-26 08:30 ` Laurenz Albe <laurenz.albe@cybertec.at>
2018-02-25 05:34 ` David G. Johnston <david.g.johnston@gmail.com>
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