Minggu, 22 Desember 2013

SCRIPT AUTO EXPIRE DROPBEAR USER / BLOCK DROPBEAR USER SAAT EXPIRE -- by Mikodemos Ragil - TESTED CENTOS !!

SCRIPT AUTO EXPIRE DROPBEAR USER by Mikodemos Ragil

what is this ??

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
2. insert cron job
  • crontab -e
PUSH  i button on your keyboard (this is vi command/not nano)
*i = insert
(Jika terdapat error (command not found)),, install crontabsnya dengan command yum -y install vixie-cron crontabs)
----------------------------------------
copy and paste this (REMEMBER MUST PUSH i on your KEYBOARD FIRST)
0 0 * * * sh /root/userexp
===================

now, push ESC button on your keyboard
and then 

type (KETIK) :

:wq
=========
*wq = write and quit, means now u have save it.

if success there will be notif like picture below




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
--------------------------------
this post originally posted on 
by mikodemos ragil
thanks to him, not me
-------------------------
Source: www.groundmans.tk 


Tambahan sedikit:
Atur Expirenya di Webmin ya.. kayak bikin user dari webmin itu loh

2 komentar: