Created
November 7, 2018 07:18
-
-
Save AJNOURI/bc2b3281807ce3f5db8e86315aff756d to your computer and use it in GitHub Desktop.
Create users from a script for testing purposes
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
#!/bin/bash | |
for i in $( cat users.txt ); do | |
useradd $i | |
echo "user $i added successfully!" | |
echo $i:$i"p@sswd" | chpasswd | |
echo "Password for user $i changed successfully" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment