
this script will lock and block all expired dropbear user by their expire time.
this file work as a cron job on your Centos VPS
Let's start - LOGIN with your root
1. Get this file to your root directory
wget http://drop.groundworlds.tk/file/userexp
crontab -e
NB: i = insert
copy and paste this (REMEMBER MUST PUSH i on your KEYBOARD FIRST)
0 0 * * * sh /root/userexp
and then
type (KETIK) :
:wq
if success there will be notif like picture below:
ENSURE IT BY entering this command
crontab -las you can see below, the script successfully listed on crontab
this script will run every day on 00.00 midnight
expired user will be locked (their password) automatically , so they can't use their account again
for unlocking the user just type :
passwd -u theirname
Done.
Tidak ada komentar:
Posting Komentar