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