How do Postgres roles work
11 March 2022 (Updated 16 March 2022)
Instructions apply to Ubuntu.
Postgres uses the concept of roles to manage authentication and authorization.
Installing postgres will create a Unix user named postgres
and a associated postgres
. Run the below and you should see a user listed.
compgen -u | grep postgres
By default, Postgres uses the ident
authentication system, meaning any Postgres roles are associated with a matching Unix system account. This means that upon a fresh install, you can log into the Postgres prompt as the postgres
Unix user:
sudo -u postgres psql
Sources
Tagged:
Postgres
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment