Skip to content

Commit

Permalink
Merge pull request #423 from rtablada/feature/pgsql-vagrant-user
Browse files Browse the repository at this point in the history
Feature/pgsql vagrant user
  • Loading branch information
fideloper committed Dec 13, 2014
2 parents a8c8e2c + d12bfad commit a97f96e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/pgsql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ sudo sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /etc/po
echo "host all all 0.0.0.0/0 md5" | sudo tee -a /etc/postgresql/$POSTGRE_VERSION/main/pg_hba.conf
sudo service postgresql start

# Create new superuser "vagrant"
sudo -u postgres createuser -s vagrant

# Create new user "root" w/ defined password
# Not a superuser, just tied to new db "vagrant"
sudo -u postgres psql -c "CREATE ROLE root LOGIN UNENCRYPTED PASSWORD '$1' NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION;"
Expand Down

0 comments on commit a97f96e

Please sign in to comment.