10.4: Move a FileVault home directory between Macs

May 03, '07 07:30:00AM

Contributed by: WinUser

I wanted to add the user of a different Mac to my new Mac by copying his home directory to the new Mac. I like to use FileVault for home directories, and the user has a FileVault directory on the original Mac, so I thought I could do this:

Well, yes and no. When I tried to log in as the user on the new Mac, I kept getting the error: 'Home folder for user "Some User" cannot be found in the usual place,' where "Some User" was the user's username on the new Mac.

I tried to fiddle with the permissions (setting ownership of the directory of the user to the user, chmod 777, emptying ~/Library/Caches, all sorts of things), but couldn't get it to work.

This is the problem: permissions use user ID, not user name. The user had ID 501 on the original Mac, and 507 on the new Mac. (501 was already used by another user on the new Mac.) So when the sparseimage gets mounted (moving his directory to /Users/.someuser and mounting the sparsemage at /Users/someuser), all files inside the sparseimage are (still) owned by 501, not 507! Solution:

Note: this has to be done when the user is logged in, otherwise you are not setting the ownership within the sparseimage. You can also open the sparesimage 'manually,' mount it on /Volumes, and set the ownership of the files inside the image from there.

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070419011539567