The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

killacct multiple accounts

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

  1. JonathanLIVE

    JonathanLIVE Well-Known Member

    Joined:
    Nov 1, 2003
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    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

    Joined:
    Apr 8, 2008
    Messages:
    447
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    PK
    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.
     
Loading...

Share This Page