How do I get rid of a Mac user acct w/o losing files?
July 21, 2009 4:35 PM   Subscribe

I have a MacBook Pro running Leopard. It has two admin accounts. Some time ago I stopped using account "A" in favor of new account "B" (the reason behind the creation of account B isn't relevant to this question, however). If I delete user account "A," what precautions must I take to ensure the preservation of the files created under "user A," and what automatically happens to the ownership of those files?
posted by Piscean to Computers & Internet (10 answers total) 3 users marked this as a favorite
When you delete a user via the Accounts option in the System perferences, you are given three options

- archive the user stuff as a disk image in a "deleted users" folder
- do nothing, save all the stuff where it was
- delete it all

These are three very clear options and you can pick one if you go this route for deleting the user. Since you're an admin on both accounts, you can easily copy those files to the B account before deleting, or you can still access them if you go the second route.
posted by jessamyn at 4:48 PM on July 21, 2009

Jessamyn- Thank you. I am still not sure what happens to ownership under those circumstances, though. if I don't change the home folder, the files are just sitting there "orphaned." Do I have to give Account B read/write permissions for all of these files?
posted by Piscean at 5:06 PM on July 21, 2009

I believe the files that were owned by A will be orphaned once you delete the account, but as long as you have account B, you can modify the permissions as necessary after the fact.
posted by Cogito at 5:18 PM on July 21, 2009

As an admin user, you can change the ownership of those files either before or after deleting their current owner. Just open the Terminal and type "chown -R `whoami` /Users/userA" (replacing "userA" with whatever user A's short name is).
posted by nicwolff at 5:22 PM on July 21, 2009

Yeah, if you're an admin you're essentially root and can change the permissions to whatever you want. I usually go to the main directory, choose "get info" and then change all the permissions and make them recursive down the file structure.
posted by jessamyn at 5:24 PM on July 21, 2009

You might also try using find plus chown to locate and re-map the ownership to B. The command you need is something like this:

$ find / -user userA -exec chown userB {} \;

The backslash before the colon may be unnecessary. This will find all files anywhere owned by userA and change their owner to userB. Obviously this will only work when run as an administrative user.
posted by axiom at 8:11 PM on July 21, 2009

I would say do not delete the other Admin account. It can be used to verify problems with the current account.
posted by Gungho at 6:55 AM on July 22, 2009

@axiom: you do need the backslash before the semicolon, or else the shell interprets it as separating the find command from a subsequent one.
posted by Cogito at 1:47 PM on July 22, 2009

@Cogito: Thanks. I suspected it would be, but not having a Mac I could try this out on, wasn't sure if maybe those kooky apple people decided to use some other character as the escape or something.
posted by axiom at 7:24 PM on July 23, 2009

« Older How to break up with someone when you don't quite...   |   OKCupid strikes again Newer »
This thread is closed to new comments.