Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- username=autopay-`</dev/urandom tr -dc X-Z0-9 | head -c4`
- password=`</dev/urandom tr -dc a-f0-9 | head -c9`
- read -p "Expired (hari): " expired
- ip=`curl -s icanhazip.com`
- useradd -e `date -d "$expired days" +"%Y-%m-%d"` -m $username
- exp="$(chage -l $username | grep "Account expires" | awk -F": " '{print $2}')"
- echo "$username - maxlogins 1" >> /etc/security/limits.d/maxlogins.conf
- cp ebay.php /home/$username
- echo -e "$password\n$password\n" | passwd $username &> /dev/null
- echo -e ""
- echo -e "Account Info"
- echo -e "=============================="
- echo -e "Host : $ip "
- echo -e "Port : 22 "
- echo -e "Directory : /home/$username "
- echo -e "Username : $username "
- echo -e "Password : $password "
- echo -e "Expired on : $exp "
- echo -e "============================="
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement