Recover password for postgresql
2014-01-25
based on http://scratching.psybermonkey.net/2009/06/postgresql-how-to-reset-user-name.html
- Edit the file
sudo nano /etc/postgresql/9.1/main/pg_hba.conf
- change into local all postgres md5 local all postgres trust|
- then do a restart
sudo service postgresql restart
now enter into the PostgreSQL using
psql -U postgres ALTER USER postgres with password 'new password';
then again change the pg_hba.conf as earlier and restart the PostgreSQL for invoking the password protection