From the command line

There are two methods to create this user. With either method, access to postgres is required (we're assuming that no other users with user creation permissions have been created). First of all, you can switch to the postgres user by performing the following command:

 su - postgres

Then create the user by typing this command at the terminal:

 createuser superuser
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) y   

Note Note

If you specify no for both of these options, then this user is a normal user, not the database superuser. For example, if a user is able to create databases but not create users, it does not make that user a super user. The same concept applies when the user can create users but not create databases.