Duplicating a user account
To keep the work I do for different clients separate I create a user on my Mac for each client. To avoid needing to set up everything the way I like it every time I do this, I have a user named Template that I duplicate. Before upgrading to Mojave my procedure was to create a user in system preferences, then delete the user folder and use a terminal command to copy over the template user to a user folder with the name of the user I just created-
sudo cp -R /Volumes/Macintosh\ HD/Users/template /Volumes/Macintosh\ HD/Users/new_user_name
Then I'd fix the permissions with-
sudo chown -RP new_user_name:staff /Volumes/Macintosh\ HD/Users/new_user_name
Now after upgrading those commands give dozens of "Operation not permitted errors" like these-
cp: /Volumes/Macintosh HD/Users/new_user_name/Library/Mail: Operation not permitted
cp: /Volumes/Macintosh HD/Users/template/Library/Mail: unable to copy extended attributes to /Volumes/Macintosh HD/Users/new_user_name/Library/Mail: Operation not permitted
The new user account has no access to my contacts, even though it is connected to iCloud and things like Notes do synch. It also doesn't have my email setup. There may be other problems, but this are the ones that I saw immediately.
There used to be a way to do this with MigrationAssistant but when I tried that, instead of just copying my template from a backup and allowing for it to be renamed, it complained that template would be the only user on the machine and it was not an admin. That doesn't seem like something I'd want to continue with.
Anyone know how to do this with Mojave???