Last active
May 15, 2017 12:52
-
-
Save blackknight36/d9ee0388373d9d967d89ddb0cdc2a5b2 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 | |
if [ $# -lt 1 ]; then | |
echo "Usage: /root/newusers users.txt" | |
exit 1 | |
elif [ $1 == 'users.txt' ]; then | |
users=`curl -s ftp://ipa.rhce.local/pub/users.txt` | |
for user in $users; do | |
useradd -s /sbin/nologin $user | |
done | |
else | |
echo "Input File Not Found" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment