sudo -u postgres psql

Then

\password postgres

Type

\q

to quit.