forked from Dreyannz/AutoScriptVPS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
usernew.sh
45 lines (43 loc) · 1.41 KB
/
usernew.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
#Script auto create user SSH
clear
echo -e ""
echo -e "::::::::: :::::::::: ::::::::: :::::::::::"
echo -e ":+: :+: :+: :+: :+: :+: :+:"
echo -e "+:+ +:+ +:+ +:+ +:+ +:+ "
echo -e "+#+ +:+ +#++:++# +#++:++#+ +#+ "
echo -e "+#+ +#+ +#+ +#+ +#+ +#+ "
echo -e "#+# #+# #+# #+# #+# #+# "
echo -e "######### ########## ######### ### "
echo -e ""
echo -e "Deb7AutoScriptVPS by _Dreyannz_"
echo -e ""
echo -e ""
read -p "Username : " Login
read -p "Password : " Pass
read -p "How Many Days? : " 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 ""
echo -e ""
echo -e "======Account Information======"
echo -e ""
echo -e "Username : $Login "
echo -e "Password : $Pass"
echo -e "Expires on : $exp"
echo -e ""
echo -e "Host / IP : $IP"
echo -e "Port OpenSSH : 22, 444"
echo -e "Port Dropbear : 80, 443"
echo -e "Port SSL : 143"
echo -e "Port Squid : 3128, 8000, 8080"
echo -e "Port OpenVPN : TCP 1194"
echo -e "OpenVPN Config : http://$IP:81/client.ovpn"
echo -e ""
echo -e "==============================="
echo -e ""
echo -e ""
echo -e ""