Skip to content

Instantly share code, notes, and snippets.

@blackknight36
Last active May 15, 2017 12:52
Show Gist options
  • Save blackknight36/d9ee0388373d9d967d89ddb0cdc2a5b2 to your computer and use it in GitHub Desktop.
Save blackknight36/d9ee0388373d9d967d89ddb0cdc2a5b2 to your computer and use it in GitHub Desktop.
#!/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