Creating users and granting permissions
Creating PostgreSQL users through Webmin is very simple. Users can be designated as owners of newly created databases and will have complete access and administrative rights to the databases they own. Users may also be granted limited privileges on specific database tables.
How to do it...
In this recipe, we will create a new user called dbuser
and grant selected privileges on a table named dbtable
in a database called testdb
.
Perform the following steps to create a user:
Navigate to Servers | PostgreSQL Database Server | PostgreSQL Users.
Click the Create new user link.
Set Username to
dbuser
and set a strong password in the Password field.Answer No to the Can create databases? and Can create users? questions.
Set Valid until to Forever.
Click the Create button.
Perform the following steps to grant user privileges on a database table:
Navigate to Servers | PostgreSQL Database Server.
Click the Granted Privileges icon.
Click the name of the database object for...