Skip to main content
2 of 3
added 65 characters in body
LayneSadler
  • 6.1k
  • 6
  • 55
  • 91

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.

LayneSadler
  • 6.1k
  • 6
  • 55
  • 91