Вот что было у меня в консоли когда я делал это:
Код:

mivz@mivzpc:~> su
Пароль:
mivzpc:/home/mivz # su postgres
postgres@mivzpc:/home/mivz> psql
Welcome to psql 8.3.1, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
postgres=# ALTER USER postgres PASSWORD 'qwerty';
ALTER ROLE
postgres=# \q
postgres@mivzpc:/home/mivz>exit
После этого пароль у postgres станет qwerty.