Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Script auto create trial user SSH
- read -p "Username : " Login
- read -p "Password : " Pass
- read -p "Expired (hari): " masaaktif
- IP=`dig +short myip.opendns.com @resolver1.opendns.com`
- useradd -e `date -d "$masaaktif days" +"%Y-%m-%d"` -s /bin/false -M $Login
- exp="$(chage -l $Login | grep "Account expires" | awk -F": " '{print $2}')"
- echo -e "$Pass\n$Pass\n"|passwd $Login &> /dev/null
- echo -e ""
- echo -e "Informasi SSH"
- echo -e "=========-account-=========="
- echo -e "Host: $IP"
- echo -e "Port: 443,143,80"
- echo -e "Username: $Login "
- echo -e "Password: $Pass"
- echo -e "-----------------------------"
- echo -e "Aktif Sampai: $exp"
- echo -e "==========================="
- echo -e "Script by \e[1;33;44mKZN\e[0m"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement