Fork me on GitHub

Create a new user for PostgreSQL

It’s a good practice to create a new user and not to use the default one (postgres).

dinduks@kubuntu:~$ sudo -u postgres -i
dinduks@kubuntu:~$ createuser --superuser <username>
dinduks@kubuntu:~$ psql
postgres=# \password <username>
<new_password>
<new_password>