Log in as root
su postgres
psql -d template1 -U postgres
alter user postgres with password 'newpassword';
\q
Then as root run ‘passwd postgres’ and reset the password there as well in order to enable the login from command line.
Admin blog with fixes to few of the issues faced.
Log in as root
su postgres
psql -d template1 -U postgres
alter user postgres with password 'newpassword';
\q
Then as root run ‘passwd postgres’ and reset the password there as well in order to enable the login from command line.