IndianWebPortal.com

Something Different In Linux

Home » cpanel » 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

 

One Response so far.

  1. dcr says:

    or, in a one-liner (or cron job)..

    /bin/find /var/cpanel/suspended/ -type f -mtime +30 -exec basename {} \; | xargs /scripts/removeacct


Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...