Posted on 11-11-2019 08:57 AM
Hi all! I used to have a process for moving a user onto a new MacBook or for clean installing a newer OS on their Mac which doesn't work anymore since High Sierra. Here's what I used to do.
Doing this always allowed the transition for the users to be very easy because everything was there like before the update was done.
BUT
Now in Mojave and Catalina even when root I get a permission denied when attempting to delete the user's home folder so I can put the tar'd home folder in its place.
I've tried a chmod to 777 and still permission denied.
I've also tried renaming the home folder and still permission denied.
Kinda stumped and don't want to just copy over users data if I can avoid it. Any thoughts?
Posted on 11-11-2019 07:55 PM
I think you may still be able to accomplish what you want, but via a different workflow:
OS X/macOS has supported this method for as long as I can remember. You don't have to worry about permissions, etc. because it handles all of that for you. When you create the user on the new Mac, it detects the home folder already there and uses it instead of creating a new empty home folder.
Posted on 11-12-2019 01:52 AM
hi, after Mac OS High Sierra, Apple change the process.
The easy way for me is:
NOW, very important: After copy the userprofile, change the user permissions with this command
first get the user-id: id -u username
now repair the permissions: sudo diskutil resetUserPermissions / user-id
Posted on 11-12-2019 06:57 AM
@ilgin I have a way that requires a lot fewer steps that you might want to try. I avoid enabling root through Directory Utility whenever possible. I'm always encountering Macs where some tech did this and forgot to disable it :). I also avoid Finder for copying a users home directory during migration. I just don't trust Finder. If I'm going computer to computer, I Thunderbolt Target mode the old computer and plug it into the new one. I rename the old hard drive "archive" to make it less confusing. Then I run the following commands (assuming the default shell is bash--after Catalina you'd need to sudo zsh instead)
sudo bash
ditto -V /Volumes/archive/Users/<username>/ /Users/<username>
Then, IF the config for old Mac>newMac is using local accounts, I create a new local acct on the new Mac with the exact same shortname. System Prefs will say "hey there's a home dir with the same name. would you like to use that home directory for this newly created account?" I say yes, please.
If the config is to use directory accounts, I don't do anything but give the Mac back to the user. When they first login, they'll get their home directory without permissions errors because ditto has copied ownership and permission setbits note-for-note. There are cases where we want to change the config from directory accounts to local accounts or vice-versa--in that case, I have to chown the home directory differently but that's another topic.
NOTE: The V option isn't necessary but it looks cool watching all the files scroll down the screen at an insane rate and if someone walks past your office it makes it look like you're doing something important. :). Sometimes I use lowercase v option. It just shows directories as they are copied.
Posted on 11-13-2019 02:51 AM
hi, after Mac OS High Sierra, Apple change the process.
The easy way for me is:
NOW, very important: After copy the userprofile, change the user permissions with this command
first get the user-id: id -u username
now repair the permissions: sudo diskutil resetUserPermissions / user-id
Posted on 11-13-2019 03:30 PM
I made a minor correction to my steps (the DMG contains the contents of the user folder, not the user folder,) but the method I described definitely still works even on Catalina. And, it means no root user, no Terminal commands, etc. because System Preferences does all the work for you. Here is Catalina's popup: