I have a server with CPanel/WHM and we have some 60,000 mailboxes, well some of them looks like compromized for easy password, and we want to reset all mailbox passwords.

  1. I tried to run /scripts/fixpop but somehow it did reset password but we dont know what it is ...
  2. I also have php script that actually scans through all mail folders and resets the password but some of them change and some of them do not !!

We are under spam attack and we need to reset all passwords to something different immediately. We can write php script and that should take care of everything.

closed as off-topic by masegaloeh, MadHatter, kasperd, Jenny D, Andrew Schulman Apr 18 '15 at 10:58

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.


Having been in the situation where some of our customer passwords have been compromised all at once (often through phishing - the idiots that create easy passwords are also the same idiots who would give it to anyone who asked through e-mail), I would definitely say that it's better by far to change only the passwords the spammers are using (I found them through the handy Squirrelmail Authenticated User header, but your webmail may vary) than to punish all 60,000 customers for the actions of the few.

But then, it sounds like you've already done that... and you don't know what the generated passwords are.

Your best bet is to just create a shell script that finds all e-mail accounts and then changes the passwords to some random string that it generates, while creating a log file of what e-mail address has what password.


Finally we made our own little HTTP Crawler, to automatically login to cpanel for all 60,000 users and change its password by posting form to change password form.

You can do this in either php or any .net program, all you need to do is act like a browser and submit your form.


Mail passwords are stored under /home/<account>/etc/<domain>/shadow with the syntax of /etc/shadow file. You can change it easily, you just need a script (probably in PHP) what can generate crypt(1) hash from password.

Not the answer you're looking for? Browse other questions tagged or ask your own question.