Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Feb 2002
    Posts
    5

    Default How to mass terminate accounts??

    Hi, i need to terminate every single domain on my coanel dedicated server. I have 600 domains on it so it would take waaaay to long to delete each account manually.

    I tried searching but came up with nothing... does anyone know the best way i can delete every single account on my server. I need to delete all of them a.s.a.p
    Maybe do it via SSH somehow?

    Thanks

  2. #2
    Member
    Join Date
    Feb 2002
    Location
    UK
    Posts
    461

    Default

    Use the Accounting functions put all the accounts usernames in a array then for each value in the array make it termanate it.

    If you get what I mean....

    Hope this helps....
    Apache to die or not to die, that is the question...

  3. #3
    Member
    Join Date
    Jul 2002
    Posts
    52

    Default

    I dont understand. How do you terminate all accounts??

    -John

    cPanel.net Support Ticket Number:

  4. #4
    Member
    Join Date
    Feb 2002
    Location
    UK
    Posts
    461

    Default

    Originally posted by kipper3d
    I dont understand. How do you terminate all accounts??

    -John

    cPanel.net Support Ticket Number:
    To easily mass termanate accounts you should use either the Perl Account Module or the PHP Module and get a list of all the accounts, put them in an array and write a script to delete them all.

    cPanel.net Support Ticket Number:
    Apache to die or not to die, that is the question...

  5. #5
    Member
    Join Date
    Apr 2003
    Posts
    52

    Default

    Hi-
    Another quick way of terminating many accounts is with /scripts/killacct <username> y (assuming that you also want to remove that user's named entries, otherwise replace the y with an n)
    You can write a perl or shell script that goes through and runs that command for each user you want to delete.
    Maybe something like:
    #!/usr/bin/perl
    @userstodie = ('joe', 'bob', 'jim');
    foreach $user (@userstodie) {
    `/scripts/killacct $user y`;
    }
    A slightly more complicated program could look in the cpanel users files and delete all the users. Hint, there's a file for every cpanel user in: /var/cpanel/users, a simple opendir() would go a long way.

    Good Luck,
    Erek Dyskant
    Unix Consultant

    cPanel.net Support Ticket Number:

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Aug 2004
    Posts
    7

    Default

    what about deleting accounts that have 0.0 MB disk/ 0.0 MB bandwidth. like a script that goes through bandwidth usage and deletes account that have no bandwidth usage>..

  7. #7
    Member adept2003's Avatar
    Join Date
    Aug 2003
    Location
    ~ "/(extra|special)/data"
    Posts
    283

    Default

    Quote Originally Posted by clanosiris
    what about deleting accounts that have 0.0 MB disk/ 0.0 MB bandwidth. like a script that goes through bandwidth usage and deletes account that have no bandwidth usage>..
    Unless you're offering free hosting, then why on earth would you want to do that? The number of times we have to run ./scripts/fixquotas etc, you may find the script deleting accounts you didn't want it to.
    Chad
    Adept Hosting Ltd
    UK Web Hosting

Similar Threads & Tags
Similar threads

  1. can't create accounts or terminate it
    By yoseman in forum New User Questions
    Replies: 5
    Last Post: 06-17-2007, 10:36 AM
  2. Multiple Terminate accounts
    By hosteurolive in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 03-15-2007, 08:20 AM
  3. Unable to terminate accounts
    By Brammeke in forum New User Questions
    Replies: 1
    Last Post: 09-18-2006, 08:18 AM
  4. Mass Terminate Script
    By clanosiris in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-30-2005, 12:02 PM
  5. Mass Terminate Accounts
    By sodapopinski in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 02-24-2003, 01:45 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube