Transfer local Active Directory User Folders to New Machine

sudo ditto --rsrc --acl path/to/old/machine/Users/ path/to/new/machine/Users/

That will do it.

The Long Story:

All my Macs are joined to Active Directory.  Most are common area machines (labs, kiosks, etc) but a few have one or a handful of regular users of those machines. I needed to upgrade them to new machines, and transfer their accounts to new machines. Normally, this would be done using Migration Assistant, but since they are AD users, without the option to force the home directory on the local disk, they don’t appear in System Preferences\Accounts, so Migration Assistant doesn’t see them, even though they have folders in /Users/ on the local machine.  I connected the two machines together with a FireWire cable and booted into Target Disk Mode (hold the T key at startup on the old machine), and ran the above command in the Terminal.

You may be asking, “why not just copy with the Finder, or use the mv command in Terminal?”  Doing either of these will result in the OS not recognizing that the user folders are linked to accounts, and it will treat them as regular folders with files, and generic permissions.  Using this command makes an exact copy of each /Users/ folder on the old machine, in the same location on the new machine.  The two switches will preserve resource forks (not really relevant in Snow Leopard and above, but the old machines were running Tiger), and preserve Access Control Lists (ACLs) so all permissions remain in tact.

Simply reboot the new machine before attempting to log in again, and everything should be as it was on the old machine.

About the Author: acletras

acletras is the sole author of this blog. He creates and writes all content here, in addition to maintaining the site. Check out the About page for more info, or use the Contact page to drop him a line.

1 Comment

  1. Reply Jorin

    This command has worked well for me until recently with 10.8. Laptops that were set up as a mobile account seem to have the most problems. Moving a home directory from a 10.8.5 computer to another computer with 10.8.5.

    Any ideas?

Leave a Reply to Jorin Cancel reply

%d bloggers like this: