Saturday, 28 November 2026

Creating your First User in Postgres

In Linux, become the postgres user to create new users.

sudo -u postgres psql

Means run psql as the postgres user (the primordial Postgres user).

Once the interactive command line appears you can review the users with \du.  This will show a role (under Role name) entitled postgres, a list of role attributes alongside e.g Superuser, Create role, Create DB, Replication and Bypass RLS.

Do \q to quite psql.

No comments: