Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ## Date: 16th May 2016
- ## Purpose: Creating Multiple users in a single attempt
- if [ "$#" = 0 ]; then
- echo "Usage: /scripts/createuser.sh file"
- else if [ -f "$1" ]; then
- for i in `cat $1`; do useradd -s /bin/bash $i; done
- for y in `cat $1`; do echo -e "password\npassword" | passwd $y; done
- for z in `cat $1`; do cat /etc/passwd |grep $z; done
- else echo "$1 not found"
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement