Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Move a FileVault home directory between Macs System 10.4
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:
  • Create a new user on the new Mac, with same username, password, and short name.
  • Set up FileVault on the new location for the user.
  • Copy the sparseimage file from the original Mac to the new home directory.
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:
  • Log in as Some User on the new Mac. It will complain, but ignore that for now.
  • Open Terminal, login as an administrator, and run these commands:
     $ cd /Users
     $ sudo chown -R someuser
     $ sudo chgrp -R someuser someuser
    Replace someuser with the short name of the new user.
  • Now log out as the user, log back in, and all should be fine.
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.
    •    
  • Currently 2.50 / 5
  You rated: 4 / 5 (6 votes cast)
 
[13,441 views]  

10.4: Move a FileVault home directory between Macs | 6 comments | Create New Account
Click here to return to the '10.4: Move a FileVault home directory between Macs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Move a FileVault home directory between Macs
Authored by: Auricchio on May 03, '07 11:33:38AM

Since you were running Tiger, why not try the Migration Assistant to do the job? Would it have worked?

---
EMOJO: mojo no longer workin'



[ Reply to This | # ]
Migration Assistant Caveat
Authored by: jecwobble on May 03, '07 11:53:10AM
I was thinking Migration Assistant in this case would work, too.

In a related UID situation, I had to change UIDs rather than changing user permissions. I had two computers (A and B for illustrative purposes). I had the first and only account on A and the first of four accounts on B, so I had a UID of 501 on both. I would mount one from the other and access my home folder on each without problems.

I got another computer, C, to replace B. I migrated the four accounts from B to C. When I mounted C from A, I could not access my home folder. Instead I could access one of the other three user's home folder.

The reason appears to be because Migration Assistant created new users on C alphabetically according to the user names on B. A user with a name that came before mine alphabetically was given UID 501, while I was given 502 (the opposite of what UIDs were on computer B). I ended up changing user 501 to 505, then changing my user to 501. Now I can properly access just my home folders on each.

Moral of the story: don't assume that UIDs are preserved while using Migration Assistant.



[ Reply to This | # ]
10.4: Move a FileVault home directory between Macs
Authored by: allanmarcus on May 03, '07 11:53:11AM

no, the migration assistant will not move a filevault home dir.



[ Reply to This | # ]
10.4: Move a FileVault home directory between Macs
Authored by: Dahak on May 03, '07 12:04:45PM
Migration Assistant can be used with FileVault, but only if the Mac in question has not been set up yet (i.e. no accounts yet)

http://docs.info.apple.com/article.html?artnum=25773#faq7

[ Reply to This | # ]
10.4: Move a FileVault home directory between Macs
Authored by: allanmarcus on May 03, '07 11:53:49AM

Don't forget to move the original master filevualt keychain or you will not be able to break into the account if you need to.



[ Reply to This | # ]
10.4: Move a FileVault home directory between Macs
Authored by: JBracy on May 03, '07 01:50:54PM

You know that you can use the "chown" command to change the group as well.

chown -R user:group <directory>

is the same as:

chown -R user <directory>
chgrp -R group <directory>



[ Reply to This | # ]