Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

donawalt

Contributor
Original poster
Sep 10, 2015
1,284
630
Hi all, I have user account that I set up on my Mac (Sonoma), that I needed to use to do some work for a friend - it has its own files, some settings modifications, apps installed, etc. - so I didn't want all that stuff in my own user account. I did the work, so now I probably won't have to do more work with this user account for 9-12 months. So I would like to remove it from my Mac, but I don't want to have to recreate the account when I need it again.

So is it as simple as backing up the Users\<Account Name> to an external disk, then delete the user account in Apple System settings? Then when needed, I just copy the folder back to the Users folder? Or do I then create a User account with the same username/password, then from my account copy the backed up user account folder over top of the created one in Users folder?

Thanks!
 

9valkyrie

macrumors member
Feb 13, 2024
47
17
Technically, you could create a tarball of the User's directory (or your preference of archiving). But you would have to create the User in the System Settings before you restore the directory. Something also of note you would have to do

Code:
chown -R [user:group] /Users/[Account Name]

when you restore or you may not be able to login. Some archives retain permissions, but double check. Some apps would obviously be excluded, but all the settings, plists, app data, and user data would be contained.
 
Last edited:
  • Like
Reactions: donawalt

9valkyrie

macrumors member
Feb 13, 2024
47
17
I totally forgot, SIP protects a lot of directories in the User's directory, so you might wanna exclude "/Users/[Account Name]/Library/" entirely when using tar. If you want things like app settings, include parts of "/Users/[Account Name]/Library/Application Support/". There are few other directories that are possible in "Library", but it's just best to avoid it. tar does retain permissions, as I have stated.
 
  • Like
Reactions: donawalt

Yebubbleman

macrumors 603
May 20, 2010
6,024
2,616
Los Angeles, CA
Hi all, I have user account that I set up on my Mac (Sonoma), that I needed to use to do some work for a friend - it has its own files, some settings modifications, apps installed, etc. - so I didn't want all that stuff in my own user account. I did the work, so now I probably won't have to do more work with this user account for 9-12 months. So I would like to remove it from my Mac, but I don't want to have to recreate the account when I need it again.

So is it as simple as backing up the Users\<Account Name> to an external disk, then delete the user account in Apple System settings? Then when needed, I just copy the folder back to the Users folder? Or do I then create a User account with the same username/password, then from my account copy the backed up user account folder over top of the created one in Users folder?

Thanks!
Apple gives you multiple ways of doing this. When deleting the account, you can specify to back it up to a disk image or you can choose the option to "don't delete home folder" in which case you can zip or tar the home folder, move it to another machine's users folders, make a "new" user account with whatever UNIX shortname the folder has, and it'll prompt you to associate that folder with the new user account. Pretty easy way to migrate user accounts manually. :)
 
  • Like
Reactions: donawalt

donawalt

Contributor
Original poster
Sep 10, 2015
1,284
630
So I decided to test this, making sure the user would be restored properly. It appeared to work fine, is there anything I did wrong or a step I need to add? I tried to keep it simple lol.

1. First I tried starting the 'Delete User' by picking the first choice - 'Save the Home folder in a disk image'. I could not get that to work, I kept getting permissions errors. The user is an Admin; from my Admin account I ensure I had full read/write privileges, plus I tried some other things I read - but I could not get it to work (and there are a number of entries in Google of others having the same issue). So I went to the second choice, 'Don't change the Home Folder'. That worked fine, deleted the user, and renamed the folder under \Users to the 'username (Deleted)'.

2. Next, for my test, I removed '(Deleted)' from the folder name.

3. Then I added a new user - same username, short name, password etc., as before. It created the user, and did not create any new folder so it seemed to use the folder I had before.

4. I logged out, and logged into that user. While I got a spinning beach ball for about a minute, the log in worked fine. I did get a warning I needed to add a password and login into iCloud (twice - once by warning message, once when I went to settings and there was a red badge asking to log into iCloud). Other than that, things seemed fine!

Look ok?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.