Skip to content

Instantly share code, notes, and snippets.

@itsprdp
Last active November 10, 2015 10:00
Show Gist options
  • Save itsprdp/800e507f673b03d67654 to your computer and use it in GitHub Desktop.
Save itsprdp/800e507f673b03d67654 to your computer and use it in GitHub Desktop.
Create postgres superuser with no password for login
####################################################
# WARNING: Don't use this on production environments
####################################################
# Login to psql terminal with postgres user
psql -U postgres
DROP ROLE root; # Run this if role root already exists
CREATE ROLE root WITH SUPERUSER LOGIN PASSWORD NULL;
createdb root;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment