fixyourserver.com

A lot of stuff and things…

How to: Delete All cPanel Accounts

I can’t ask why you would want to perform this but I have run in to this occasion where a client wants to clear a server out.

DISCLAIMER This will delete all of the accounts on your server and can cause irreversible damage.

That said, on to the goods:

#!/bin/bash
IFS="$"

ls /var/cpanel/users | while read KUSER; do
      echo 'y' | /scripts/killacct ${KUSER}
done

Hope that helps.

Next Post

Previous Post

Leave a Reply

© 2017 fixyourserver.com

Theme by Anders Norén