Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- set -e
- rand_number=`openssl rand -base64 32`
- POSTGRES_PASSWORD=${rand_number//\//} # Remove slashes other sed command with fail
- sudo -u postgres psql -U postgres \
- -d postgres \
- -c "alter user postgres with password '$POSTGRES_PASSWORD';"
- echo "Your postgres password is $POSTGRES_PASSWORD"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement