terminate old suspended accounts

Question : How to terminate old suspended accounts on cpanel server ?
Ans:  You can terminate the 90 days old suspended accounts by using the following script.
1) vi /root/terminatesuspended.sh
==================
for i in `find /var/cpanel/suspended/ -mtime +90 | cut -d'/' -f5 | sed '1 d'`
do
y | /scripts/killacct $i --killdns n;
done;

==================
2) sh /root/terminatesuspended.sh &
3) Done
 

Leave a Comment