Question about adding/removing email accounts and losing passwd, quota and shadow

danimal

Well-Known Member
Jul 14, 2003
79
0
156
Hiya!

I just noticed a weird problem with email accounts and passwd, quota, and shadow files. I upgraded to the latest Stable (R53) today. One of my hosted clients (acct=myclient, domain=myclient.com) complained that when they deleted an email account, suddenly no one could access their email. I checked the logs and found out that when they deleted the email account, it caused the files in:
/home/myclient/etc/ to be removed. Specifically, passwd, quota and shadow. The files are still in: /home/myclient/etc/myclient.com/ though. I know that they are hard-linked together with the same inode, but something about the code to delete (and as I later discovered, add) an email account causes these three files to disappear.

Normally, I wouldn't mind... and perhaps it's as it should be (i.e. only files in /home/myclient/etc/myclient.com/), but cpanelpop for email accounts with the myclient account are trying to match username/password values with /etc/shadow or /home/myclient/etc/shadow and now that totally fails.

Is there any way to fix this? For now, I re-established the hard links, but I tested it and as soon as my client needs to either add an email account or remove an email account, it'll remove these three files again.

The problem is less that the three files are being deleted and more that cpanelpop is trying to look up user info from /home/myclient/etc/ rather than /home/myclient/etc/myclient.com/

If I could understand how to have cpanelpop look up user info in the right place, then I wouldn't care of these three files are getting removed.

Ideas anyone?

Thanks!

-Danimal :cool:
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
You're probably better off restoring the account from backups if you have them. Was the cPanel account near or over their disk quota at the time they deleted the POP account? If so, I woul guess that that could have caused the problems.