Created
January 9, 2015 14:11
-
-
Save FruitieX/1bf7834cfd31cd7cb1c2 to your computer and use it in GitHub Desktop.
This file contains 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
IFS=$'\n' | |
for line in $(cat openstackusers.txt); do | |
user=$(echo $line | cut -d' ' -f1) | |
pwd=$(echo $line | cut -d' ' -f2) | |
# add user | |
sudo useradd -m $user | |
# set user password | |
echo -e "$pwd\n$pwd" | sudo passwd $user | |
# remove users by uncommenting | |
#sudo userdel $user | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment