Created
June 19, 2015 19:07
-
-
Save markjfletcher/ba10a6bf733e56289575 to your computer and use it in GitHub Desktop.
Simple Add User and Set Password Script
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 | |
clear | |
users=(user1:pass user2:pass user3:pass) | |
for user in "${users[@]}" | |
do | |
password=${user##*:} | |
username=${user%:*} | |
echo Adding $username with Password $password | |
adduser $username | |
echo $user | chpasswd | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment