

To outfit your user with a password, you can add the words –pwprompt to the createuser command: createuser -pwprompt Connecting to the Postgres Databases Shall the new role be a superuser? (y/n) y Once logged in as this user, you can move forward to create more roles in your PostgreSQL system: createuser Enter name of role to add: newuser

To begin creating custom users, first switch into the default user: sudo su – postgres “ is md5 which asks the client to supply an encrypted password. The alternative which can be set in the authentication configuration, located in “/etc/postgresql/9.1/main/pg_hba.conf The postgres default is to use ident authentication, tying each server user to a Postgres account. The other users are specified in one of variety of ways. When it is first installed on a server, the default postgres user is actual named “postgres”. Postgres uses the concept of roles to distinguish the variety of users that can connect to a database. Once Postgres has been installed on your server, you can start to configure the database. Create Your PostgreSQL Roles and Databases With that, postgres is installed on your server. Once apt-get has updated go ahead and download Postgres and its helpful accompanying dependencies: sudo apt-get install postgresql postgresql-contrib You can use the search functionality at the top of the page to find a more recent version.īefore we install postgres, we should quick perform a quick update of the apt-get repository: apt-get update If available, we strongly recommend using a guide written for the version of Ubuntu you are using. This guide might still be useful as a reference, but may not work on other Ubuntu releases. Reason: Ubuntu 12.04 reached end of life (EOL) on Apand no longer receives security patches or updates.

If you are currently operate a server running Ubuntu 12.04, we highly recommend upgrading or migrating to a supported version of Ubuntu: This article covers a version of Ubuntu that is no longer supported.
