When I was setting up postgresql on linux, I was following a tutorial that I think had me change the postgres account password and I did not know any better. Please forgive my ignorance.
When I type "psql postgres" it asks for a password and only one password works. I have tried following previous answers by implementing "sudo passwd --lock postgres" and "sudo -u postgres psql postgres" with "\password postgres" and setting a new password (which does not work).
I am afraid to edit /etc/passwd and put * instead of the password because that comment has very few upvotes and I don't know what it will actually do.
Everything I try (even changing md5 to trust in pg_hba.conf), after I enter "sudo /etc/init.d/postgresql restart", psql postgres STILL REQUIRES a password and it only accepts the one password that works. Anything else returns 'psql: FATAL: password authentication failed'.
What can I do?