pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Julien Rouhaud <julien.rouhaud@dalibo.com>
To: Davide Toller <toller.davide@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: Lost superuser login grant
Date: Thu, 20 Oct 2016 14:28:44 +0200
Message-ID: <2c72583f-6458-a334-496b-3f3ec368f8d5@dalibo.com> (raw)
In-Reply-To: <CAJcb3p5j1Dxz0AXVYRPB+HDZAm3OoxnSCNghDSWmO4GLTgo5qg@mail.gmail.com>
References: <CAJcb3p5j1Dxz0AXVYRPB+HDZAm3OoxnSCNghDSWmO4GLTgo5qg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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



view thread (2+ messages)

Message-ID: <2c72583f-6458-a334-496b-3f3ec368f8d5@dalibo.com>
Permalink:  ../2c72583f-6458-a334-496b-3f3ec368f8d5@dalibo.com/
Also on:    postgresql.org/message-id/2c72583f-6458-a334-496b-3f3ec368f8d5@dalibo.com

 · 

reply

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: julien.rouhaud@dalibo.com, toller.davide@gmail.com
  Subject: Re: Lost superuser login grant
  In-Reply-To: <2c72583f-6458-a334-496b-3f3ec368f8d5@dalibo.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