Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- source=$(cat $1)
- counter=0;
- username="";
- login="";
- password="";
- while IFS='' read -r line || [[ -n "$line" ]]
- do
- let "counter += 1"
- if [[ counter -eq 1 ]]
- then
- username=$line
- elif [[ counter -eq 2 ]]
- then
- login=$line
- else
- then
- password=$line
- adduser $login --gecos "$username" --disabled-password && echo "$login:$password" | chpasswd
- username=""
- login=""
- password=""
- let "counter = 0"
- fi
- done < "$1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement