Failed to save mailbox Honme directory already exists

I got that old freebsd box converted to centos finally. Everything appears to work but...

In virtualmin/Edit Users I cannot edit a user account without getting the Home Directory already exists error.

System hostname mail.lucketts.net (208.82.84.6) Operating system CentOS Linux 6.4 Webmin version 1.630 Virtualmin version 4.01 Pro

Forum searches come up with old reports of similar problem due to sym links. I do not have any sym links on the centos box that I know if, but the original BSD box did have sym links.

Any suggestions?

Steve

Status: 
Active

Comments

Howdy -- hmm, if you go into System Settings -> Re-Check Config, does it detect any problems on your system?

.. your system is ready for use by Virtualmin.

I have the support module loaded if that helps.

It may be a permissions problem. A newly vreated account works fine, but an old account gives the error. I'll see if there is a permission difference.

Steve

The old servers stored names as username only. The new server appends domain name to user name.

example old account steve@lucketts.net = old username: steve

new account aaa@lucketts.net = new username aaa.lucketts.net

I tried changing user steve to user steve.lucketts.net but that did not fix the original error for steve. Plus, I'd have to coordinate with all of my existing users to get them to change their mail logons. Don;t want to do that. I'll find the user name setting that appends the domain name as see if I can turn that off for new names.

At first glance folder and file permissions for the new aaa.lucketts.net user look same as permissions for old user steve

Steve

update... sorrry the name format thing was a fluke. There was a duplicate user aaa home directory do the new one was created as aaa.lucketts.net. I deleted all "aaa" and started over, new user have the right name "aaa". And new user is editable.

Old users still not editable by admin. Old user can still change their own password via usermin.

I can live with this for passwords, but quotas and other features need admin access.

Steve

Andy, More tests:

1) I tried changing a quota on my account and it failed. 2) I renamed the account to steve_old and tried saving the quota change again, it worked and creted a new steve home directory 3) I tried changing the quota again and the change failed (new home directory)

So... if I create a new account I can make changes with no problem. Old accounts I cannot make changes. If I rename the old account home directory and make a change, it works that one time. If I try to make another change, I get the same error.

It would appear that the source of the error is not in the home directory, since the error comes back evem in a newly created directory on an old account, but not a new account.

What other locations do you store account info that may have been corrupted or lost in a restore from a VM FreeBSD server?

Steve

more... The accounts we cannot edit in VM have md5 hashes in the shadow file, but that does not appear to be the root cause. I changed a user password via centos command line, verified it is using the longer default hash in the shadow file, and then verified that I still could not make user account changes in VM.

I then changed the VM clear text password file so that it reflected the new hash in the shadow file. Tested account again but still not able to make changes in VM. Account is otherwise functional.

Steve

Those are some strange issues!

I've asked Jamie if he has any input on what might be causing that.

However, is there any chance we could login to your server to take a look? That would aid us in discovering what's going awry there.

If that's okay, could you email root login details to eric@virtualmin.com? Thanks!

I thought that was what the support module provided. I'll email root access.

Thanks...

Steve

Ok, I had a look at your system and found the issue - the problem users had their home directories set to /usr/home/domain.com/homes/something , while the working users were under /home/domain.com . Because /usr/home is just a symlimk to /home this mostly works ... but causes problems when editing a user, as Virtualmin incorrectly thinks that /usr/home and /home are different.

I have fixed this on your system, and will include the fix in the next release.

Problem fixed!

Thanks for catching that. I didn't notice that sym link in /usr/home even though I looked for it.

For future reference, can you tell me how you changed all of the old users to the new path?

Steve

I didn't actually change the users at all - just fixed the bug in Virtualmin that caused it to fail when editing such a user.