Fastest Way To Zap Multiple Accounts [Urgent]

bugmaster

Member
Dec 29, 2005
9
0
151
I recently acquired 15 servers with massive amounts of accounts
98% unused, over 4000 per server

I need to delete 3800 of these on each server but the problem is because they
were unmanaged for so long, deleting 1 account via WHM or /scripts/killacct
takes 15 minutes to remove 1 account

due to something like mkvhostspasswd or something taking forever to rehash

Is there any way I can get these accounts removed faster?
 

oulzac

Well-Known Member
Aug 7, 2005
131
0
166
Yes, with the terminate multiple accounts feature in whm, in the Multi-Account Functions section.
 

bugmaster

Member
Dec 29, 2005
9
0
151
That does not help, it takes 15 minutes per remove (mass terminate still does one at a time, just get to select ahead of time), the web app will run for 6 hours to remove 50 accounts and takes 99.9% of the cpu PER USER once it hits that mkvhostspasswd stage
 
Last edited:

bugmaster

Member
Dec 29, 2005
9
0
151
geez

i started mass terminate since last post
at this time it has only removed 3 accounts in total
 

bugmaster

Member
Dec 29, 2005
9
0
151
peeking

just peeking at the mkvhostspasswd code, didnt get far but

opendir(PROFTPDVHOSTS,"/etc/proftpd");
my @NAMELESS=readdir(PROFTPDVHOSTS);
@NAMELESS=grep(!/^\.+$/, @NAMELESS);
closedir(PROFTPDVHOSTS);

Could this be whats slowing it down and if i just zap all the bad accounts here prior to terminating, that will speed up the proccess?
 

bugmaster

Member
Dec 29, 2005
9
0
151
not a coder

I'm not a coder or a engineer, or whatnot, but if you ask me this procedure is useless to be run in this predicament...... sure it might be a part of some sorta test that needs to be done when managing accounts, but in certain conditions such as rmeoving 1 account, why 1000 others have to be checked for a nameless account is beyond me, seeing how
it just deleted the proftpd file that it really should be checking before even running this...
thats my 2 cents... but then again, i have worked with programmers for 10 years and i know how that scene goes,

my problem was solved with my own 10 lines of code to find and rmeove ununsed accounts... and this was indeed the bottleneck

15 minutes now down to 2 minutes per terminate
still slow but tolerable
 

bugmaster

Member
Dec 29, 2005
9
0
151
pointless

pointless and expensive, the drives are multiple 200 gigs+ per server

a better solution would be to learn how to program, kinda sad someone who has
no programming knowledge and used cpanel for less than a month can code better than someone making 150k+ a year specifically on the project and a cpanel supposed expert
 

randomuser

Well-Known Member
Jun 25, 2005
147
0
166
bugmaster said:
just peeking at the mkvhostspasswd code, didnt get far but

opendir(PROFTPDVHOSTS,"/etc/proftpd");
my @NAMELESS=readdir(PROFTPDVHOSTS);
@NAMELESS=grep(!/^\.+$/, @NAMELESS);
closedir(PROFTPDVHOSTS);

Could this be whats slowing it down and if i just zap all the bad accounts here prior to terminating, that will speed up the proccess?
Oh how I wish one day cPanel would fix this code