Last Updated: February 25, 2016
·
639
· drabiter

Give password for a role on PostgreSQL

You must have root access,

sudo -u postgres psql -c "ALTER USER username PASSWORD 'password';"

Life saver.