Created
May 28, 2017 03:57
-
-
Save kzn4/ff2f2445a676e311358b632ab93c5fe8 to your computer and use it in GitHub Desktop.
user renew
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Script Perpanjang User SSH | |
read -p "Username : " Login | |
read -p "Penambahan Masa Aktif (hari): " masaaktif | |
mati="$(chage -l $Login | grep "Account expires" | awk -F": " '{print $2}')" | |
chage -E `date -d "$masaaktif days" +"mati"` $Login | |
exp="$(chage -l $Login | grep "Account expires" | awk -F": " '{print $2}')" | |
echo -e "--------------------------------" | |
echo -e "Akun Sudah Diperpanjang Hingga $exp" | |
echo -e "===========================" | |
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