Create a New Role
From the postgres
Linux account, you have the ability to log into the database system. However, we’re also going to demonstrate how to create additional roles. The postgres
Linux account, being associated with the Postgres administrative role, has access to some utilities to create users and databases.
We can create a new role by typing:
- createuser –interactive
This basically is an interactive shell script that calls the correct Postgres commands to create a user to your specifications. It will only ask you two questions: the name of the role and whether it should be a superuser. You can get more control by passing some additional flags. Check out the options by looking at the man
page:
- man createuser