Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bxCT5-00017I-HY for pgsql-admin@arkaria.postgresql.org; Thu, 20 Oct 2016 12:29:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bxCT4-0004sY-Ra for pgsql-admin@arkaria.postgresql.org; Thu, 20 Oct 2016 12:29:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bxCT4-0004r2-3c for pgsql-admin@postgresql.org; Thu, 20 Oct 2016 12:29:06 +0000 Received: from mimolette.dalibo.net ([212.85.157.144] helo=mail.dalibo.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bxCT0-0005kD-AO for pgsql-admin@postgresql.org; Thu, 20 Oct 2016 12:29:05 +0000 Received: from nol.local (aur75-1-78-192-238-147.fbxo.proxad.net [78.192.238.147]) by mail.dalibo.com (Postfix) with ESMTPSA id 9D8302C029A; Thu, 20 Oct 2016 14:29:00 +0200 (CEST) Subject: Re: Lost superuser login grant To: Davide Toller , pgsql-admin@postgresql.org References: From: Julien Rouhaud Message-ID: <2c72583f-6458-a334-496b-3f3ec368f8d5@dalibo.com> Date: Thu, 20 Oct 2016 14:28:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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