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, leavingIf you leave the username blank, it will prompt you to change the password of the 'postgres' user by default.