dashwood.net -

Ryan Stefan's Micro Blog

Postges Password Reset and Allowing Connections

Feb 102019

No password on postgres user fix:

pg_hba.conf

local  all   all   trust
ALTER USER postgres with password 'newpassword';

Then you can add your user account as a superuser:

ALTER ROLE ryan with SUPERUSER;

# then restart the server
sudo /etc/init.d/postgresql restart

You'll probably need to change your pg_hba.conf file back to something like this:

local  all                                          trust
host   all        127.0.0.1      255.255.255.255    trust
host   booktown   192.168.1.3    255.255.255.255    ident    sales
host   all        192.168.1.4    255.255.255.255    ident    audit

Comments