Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l749f-0007y5-JE for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 22:28:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l749e-0004yI-I7 for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 22:28:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l749d-0004yA-6W for pgsql-general@lists.postgresql.org; Tue, 02 Feb 2021 22:28:14 +0000 Received: from [64.147.123.24] (helo=wout1-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l749a-0003Qw-B8 for pgsql-general@lists.postgresql.org; Tue, 02 Feb 2021 22:28:12 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id F293052A; Tue, 2 Feb 2021 17:27:58 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 02 Feb 2021 17:27:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=e ex+mFg1KJvX2K2k1KmQ/NRRC08jxCXGJABCVkhhVXI=; b=B9CrAr0NMg52ZQ/ms r998YuuRMG7WSEwWQ7zgG7Sv7LOmo9tf9XLglQ1+CB9Ot+Z+XIG1cVKGaYtgdZVb xjCh5in3FINEER3t7ugIJMlgByi+hKs2w99ma/n0n6g7KDw4mLcEZeTBEnzKDmSK z30ZcnYBlCi/4MlYIfwTsrkfduyEIq++1csxC1sjBpF81+RpOnkZUr1ihsi+Artb 8q6Qg81gd/JQ5fGFrKoL7byXFygRoBKrCxdgVWnqRByOpepOw7g9Px5TVhKZ1AnX /g8eO+p5leuwHG5ZXY+TbTRVLk12rhFs0a/NNK7H2UJ6LTpCIzwObGhc0iuVtHlZ hGz8g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=eex+mFg1KJvX2K2k1KmQ/NRRC08jxCXGJABCVkhhV XI=; b=qcIm7cF/2WOW6Ibv1LIydrbFbN5eXatmloKAjhPE562tysPLa5SF291qc IOCXbwoqASMwAZRRkA1LZI5s4fB/PyyfeYl+8wsjQdqPZzoj4RyNmaf1O1kpHTCS /Vev7UK6e7v793xd48YeyAjt5GMZAiq7/DcQfG8R8RY5wRSVEEZkZvVcFzYvdo0f AqVeThi3zkQkARQn4PW7uQfus1JfsagiR1RIFdyEIp8fMhbT1At5ucvtMsqUT3K/ k6B9AWM55AGn8vt39uucHsQwnXpZ9R5eeWLprkkeXWhZrwb5Kt4tZ7H8SN/qTPFA mmFhObTsbhAWJi2DPH26tNWI/f6Sw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgedtgdduiedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeevveefveefueegffekkefhgeeiueffgfetueejvdfg hfeujeejhfekjeelgedtgeenucfkphepleejrdduudefrddvudejrddvjeenucevlhhush htvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.4] (97-113-217-27.tukw.qwest.net [97.113.217.27]) by mail.messagingengine.com (Postfix) with ESMTPA id C3CBB240057; Tue, 2 Feb 2021 17:27:57 -0500 (EST) Subject: Re: permission denied to create and drop user To: Joao Miguel Ferreira , pgsql-general References: From: Adrian Klaver Message-ID: <0f563274-5f45-85aa-69a8-1d3440329bc1@aklaver.com> Date: Tue, 2 Feb 2021 14:27:56 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.24 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/2/21 1:58 PM, Joao Miguel Ferreira wrote: > Hello all, > > I have just installed postgresql on Debian stable (from debian apt > archives). It seems that the postgres user does not have permissions to > DROP/CREATE USER. I was expecting the postgres user to be a superuser > but something seems weird. my postgres user does not have the usual > superuser attributes. > > Please see my results bellow: > > root@deb10tp:/# id > uid=0(root) gid=0(root) groups=0(root) > root@deb10tp:/# pwd > / > root@deb10tp:/# su postgres > postgres@deb10tp:/$ psql > psql (11.9 (Debian 11.9-0+deb10u1)) > Type "help" for help. Not sure how you can do above when below the postgres user does not have LOGIN attribute? What where the exact steps you took when you did the install? > > postgres=> DROP USER foo; > ERROR:  permission denied to drop role > postgres=> DROP USER postgres; > ERROR:  permission denied to drop role > postgres=> CREATE USER foo; > ERROR:  permission denied to create role > postgres=> \du >            List of roles >  Role name | Attributes | Member of > -----------+------------+----------- >  pgcon     |            | {} >  postgres  |            | {} > > How do I get a superuser/postgres that is capable to CREATE / DROP > another user? or a user that might allowed to do anything? > > Thank you > Joao > -- Adrian Klaver adrian.klaver@aklaver.com