Last active
February 16, 2016 03:11
-
-
Save mccun934/15d72f4d4174eb4fd866 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pulp-admin login --user admin --password=$(grep default_password /etc/pulp/server.conf |grep -v '\#' | awk '{print $2}') | |
echo "******* Pulp users before re-creation" | |
echo "" | |
pulp-admin auth user list | |
cd /tmp | |
sudo -u postgres psql -q -d foreman -c "select remote_id from users;" -t | xargs -n1 -I arg1 pulp-admin auth user create --login arg1 --password $(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
sudo -u postgres psql -q -d foreman -c "select remote_id from users;" -t | xargs -n1 -I arg1 pulp-admin auth role user add --role-id super-users --login arg1 | |
echo "******* Pulp users after re-creation" | |
echo "" | |
pulp-admin auth user list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment