To interactively change/assign the password of an existing user in the psql shell
\password <username>
# you will be prompted for the password that you want to define
By default, leaving the username blank will prompt you to change the password of the 'postgres' user.