Skip to content

Instantly share code, notes, and snippets.

@Morley93
Created March 17, 2017 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Morley93/d974b6239f169687c85a1921eff28d46 to your computer and use it in GitHub Desktop.
Save Morley93/d974b6239f169687c85a1921eff28d46 to your computer and use it in GitHub Desktop.
createUsers.sh
#!/bin/sh
# Creates some users from a file with a default password
xargs -n1 sudo useradd -g users -m -s /bin/bash < $1
xargs -n1 -I{} echo "{}:Password1" < users.txt | sudo chpasswd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment