Skip to content

Instantly share code, notes, and snippets.

@mdiener21
Created February 7, 2017 20:18
Show Gist options
  • Save mdiener21/b423e0aee9e7fa4b46054696d7938881 to your computer and use it in GitHub Desktop.
Save mdiener21/b423e0aee9e7fa4b46054696d7938881 to your computer and use it in GitHub Desktop.
Set initial password for postgres database ubuntu fresh install
#In a terminal, type:
sudo -u postgres psql postgres
# this connects as a role with same name as the local user, i.e. "postgres", to the database called "postgres" (1st argument to psql).
# Set a password for the "postgres" database role using the command:
\password postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment