Skip to content

Instantly share code, notes, and snippets.

@kzn4
Created May 28, 2017 04:11
Show Gist options
  • Save kzn4/81b8fbb899bc99cc88ff56f7fc6ac00e to your computer and use it in GitHub Desktop.
Save kzn4/81b8fbb899bc99cc88ff56f7fc6ac00e to your computer and use it in GitHub Desktop.
trial
#!/bin/bash
#Script auto create trial user SSH
#yg akan expired setelah 1 hari
#www.fawzya.net - 085799054816
Login=trial-`</dev/urandom tr -dc X-Z0-9 | head -c4`
masaaktif="1"
Pass=`</dev/urandom tr -dc a-f0-9 | head -c9`
IP=`dig +short myip.opendns.com @resolver1.opendns.com`
useradd -e `date -d "$masaaktif days" +"%Y-%m-%d"` -s /bin/false -M $Login
echo -e "$Pass\n$Pass\n"|passwd $Login &> /dev/null
echo -e "Host: $IP"
echo -e "Port: 443,143,80"
echo -e "Username: $Login "
echo -e "Password: $Pass\n"
echo -e ""
echo -e "Akun ini hanya aktif 1 hari"
echo -e "Script by \e[1;33;44mKZN\e[0m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment