pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Lost superuser login grant
2+ messages / 2 participants
[nested] [flat]

* Lost superuser login grant
@ 2016-10-20 12:25  Davide Toller <toller.davide@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Davide Toller @ 2016-10-20 12:25 UTC (permalink / raw)
  To: pgsql-admin

Hello to all,
I made a mistake by revoking the grant login to my superuser "postgres".

Now, when I try to access my database I get the following error:

psql: FATAL:  role "postgres" is not permitted to log in

I'm working with Postgres 9.3 on Red Hat 6.
There is a way to give back the login grant to user "postgres"?

I tried to edit the pg_hba.conf, but I was not able to login anyway.


Thanks & Regards,
Davide

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Lost superuser login grant
@ 2016-10-20 12:28  Julien Rouhaud <julien.rouhaud@dalibo.com>
  parent: Davide Toller <toller.davide@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Julien Rouhaud @ 2016-10-20 12:28 UTC (permalink / raw)
  To: Davide Toller <toller.davide@gmail.com>; pgsql-admin

On 20/10/2016 14:25, Davide Toller wrote:
> Hello to all,
> I made a mistake by revoking the grant login to my superuser "postgres".
> 
> Now, when I try to access my database I get the following error:
> 
> psql: FATAL:  role "postgres" is not permitted to log in
> 
> I'm working with Postgres 9.3 on Red Hat 6.
> There is a way to give back the login grant to user "postgres"?
> 

I think the only way is to stop postgres, and launch it in single user mode:

postgres --single -D /path/to/pgdata

Then you should be able to grant login privilege to your superuser.

-- 
Julien Rouhaud
http://dalibo.com - http://dalibo.org


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-10-20 12:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-10-20 12:25 Lost superuser login grant Davide Toller <toller.davide@gmail.com>
2016-10-20 12:28 ` Julien Rouhaud <julien.rouhaud@dalibo.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