Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

killacct multiple accounts

Discussion in 'General Discussion' started by JonathanLIVE, Jan 1, 2009.

  1. JonathanLIVE

    JonathanLIVE Well-Known Member

    Nov 1, 2003
    Likes Received:
    Trophy Points:
    I need to know a way to use /scripts/killacct so that I can just put in a list of accounts and not have to type Y for every single one.

    Using WHM will take too long to point and click.. I have a list of user names and would just like to drop into SSH and use the killacct script without having to babysit it.

    I tried looking into the script itself, but it uses a perl script that is encoded, so I had no way to hack it to do this.

    Any suggestions?
  2. JawadArshad

    JawadArshad Well-Known Member PartnerNOC

    Apr 8, 2008
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    DataCenter Provider
    Try this.

    1- Make a file /home/users that has list of all the cpanel users that you want to delete.
    2- for user in `cat /home/users` ; do yes | /scripts/killacct $user; sleep 1 ; done

    This will delete all the users without prompting for confirmation, but remember apache is restarted whenever an account is terminated to remove the httpd.conf entries of the killed account, killing accounts in bulk can mean downtime for other sites on the server.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice