-
Notifications
You must be signed in to change notification settings - Fork 4
/
usernew.sh
46 lines (44 loc) · 2.24 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
46
#!/bin/bash
#Script auto create user SSH
clear
echo -e " "
echo -e "\e[94m ::::::::: :::::::::: ::::::::: ::::::::::: "
echo -e "\e[94m :+: :+: :+: :+: :+: :+: :+: "
echo -e "\e[94m +:+ +:+ +:+ +:+ +:+ +:+ "
echo -e "\e[94m +#+ +:+ +#++:++# +#++:++#+ +#+ "
echo -e "\e[94m +#+ +#+ +#+ +#+ +#+ +#+ "
echo -e "\e[94m #+# #+# #+# #+# #+# #+# "
echo -e "\e[94m ######### ########## ######### ### "
echo -e "\e[94m Deb7AutoScriptVPS by Shigeno "
echo -e "\e[0m "
echo -e " "
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, 143 "
echo -e " Port Dropbear : 80, 443 "
echo -e " Port SSL : 442 "
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 ""