# PgAccess Tutorial - User Administration

While user administration is really not a part of the PgAccess program, it is such a basic operation that a brief description is given here.

## Creating users

The procedure for setting up postgreSQL usually results in a single user named `postgres`. In order for anyone else to use postgreSQL, users must be added. The program `createuser` accomplishes this. First become the PostgreSQL administrator (usually `postgres`):

`su postgres`

Then create a new user:

`createuser jim
Enter user's postgres ID or RETURN to use unix user ID: 500 ->
Is user "jim" allowed to create databases (y/n) y
Is user "jim" a superuser? (y/n) y
createuser: jim was successfully added`

You can use either the UNIX user ID or the postgres ID to identify users. See the postgreSQL documentation in the "admin" section for a fuller account of users and groups.

The reason for using the command line to create the first user (other than postgres) is that postgres may not have X-Window permission. You can also create users using PgAccess if you are created as a superuser as shown in the example above.

## Removing users

To remove users, use the `destroyuser` command in the same way.

Back to index