#1 (permalink)  
Old 04-26-2003, 01:58 PM
Registered User
 
Join Date: Feb 2002
Posts: 5
Juliet
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-26-2003, 02:01 PM
Registered User
 
Join Date: Feb 2002
Location: UK
Posts: 461
SoftmegUK
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-05-2003, 10:01 PM
Registered User
 
Join Date: Jul 2002
Posts: 52
kipper3d
I dont understand. How do you terminate all accounts??

-John

cPanel.net Support Ticket Number:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 08-06-2003, 06:01 AM
Registered User
 
Join Date: Feb 2002
Location: UK
Posts: 461
SoftmegUK
Quote:
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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 08-08-2003, 11:15 PM
Registered User
 
Join Date: Apr 2003
Posts: 52
dysk
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:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-21-2005, 05:38 PM
Registered User
 
Join Date: Aug 2004
Posts: 7
clanosiris is on a distinguished road
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>..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 08-21-2005, 05:43 PM
adept2003's Avatar
Registered User
 
Join Date: Aug 2003
Location: ~ "/(extra|special)/data"
Posts: 283
adept2003 is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:27 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc