Fill these in once
- Change the password
psql postgres -c "ALTER USER postgres WITH PASSWORD 'change-me';"Prefer not to type it in a command? Open psql and run \password followed by the user name.
- Change the passwordNeeds sudo
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'change-me';"Prefer not to type it in a command? Open psql and run \password followed by the user name.
- Change the password
psql -U postgres -c "ALTER USER postgres WITH PASSWORD 'change-me';"Prefer not to type it in a command? Open psql and run \password followed by the user name.