2

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.

Akash Kava
  • 467
  • 3
  • 8
  • 19
  • 2
    **Questions involving web hosting control panels** are off-topic at [sf] because they [customize their systems beyond the ability to be supported in normal ways](http://meta.serverfault.com/q/8055), and thus require support from the vendor or the web hosting industry. See [Where can I ask questions about web hosting control panels?](http://meta.serverfault.com/q/8094) – masegaloeh Apr 17 '15 at 22:52

3 Answers3

3

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.

Ernie
  • 5,352
  • 6
  • 31
  • 37
1

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.

Akash Kava
  • 467
  • 3
  • 8
  • 19
0

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.

Gabor Garami
  • 281
  • 2
  • 13