Moving Your Home Directory

Make Upgrades Easier


Justin Williams Skip to comments 31 Comments (Comments Closed Closed)

Ever had to spend a lot of time backing up your data to CDs and DVDs before doing a fresh install of OS X? Why bother? Justin Williams will teach you how to move your home directory to a new hard drive.

This article is adapted from Mike Bombich's original tutorial. I wanted to rewrite this for Tiger because his only discusses Jaguar, and I wanted to explain how to do it via NetInfo Manager. Whenever you want to do a fresh install of Mac OS X, there is always a problem you run into: backing up your data. When you do a fresh install, all of the data on a hard drive is erased, including your data. Unless you are backing up your data to an external hard drive, you are might have to end up burning a lot of CDs and DVDs. There is a better way though. It's relatively simple to move our Users directory to another hard drive. Whenever you reinstall OS X, you can erase your OS X partition and not have to worry about losing your data. It will all be located on that separate hard drive. When your new system is up and running, you can simply reconnect your Users directory and go about your way. Sound like fun? Let's get to work. ### Warning I am going to warn you that this is one of the more technical tutorials we have done on MacZealots, and there is a chance your Mac could die. If you aren't comfortable working in the Terminal or doing basic troubleshooting, leave now. I don't want hate mail. I'm going to assume you have already installed the new hard drive in your system or have a spare partition created. If you don't, and don't know how to go about that, I implore you to find a Mac nerd to do it for you. With that out of the way, let's get started. ### Setting It Up The first thing we need to do is move our Users folder to the new hard drive. We accomplish this via the Terminal. sudo ditto -rsrcFork -V /Users /Volumes/YourOtherPartition/Users This command will copy everything from inside /Users on your system drive to the new drive while keeping any resource forks intact. This may take a while depending on how much data you have. On my G5 with over 60GB of data, it took over an hour. Once this is complete, we need to tell the NetInfo database that we have moved your home directory. This needs to be done for all user accounts you have created. To do that open up NetInfo Manager. Click the lock in the bottom left corner to authenticate. Once completed, move to the user's option and then click on your user name. Under the Property/Values table there will be a row called _home_. Presently it is pointed at _/Users/yourname_. Change that to equal the value you had for _/Volumes/YourOtherPartition/Users/_ and then append your short name to that. If you don't know your short name, open System Preferences and go to the Accounts pane. You will be able to find your short name there. You can see my values in the screenshot below: NetInfo Manager Save your changes to the NetInfo database and then **log out and try to log back in**. This is very important. If this doesn't work, you did something wrong. Reread the instructions and double check everything. Assuming everything is ok, we can now delete your old Users directory and create a symbolic link to the new one. We have to use symbolic links instead of aliases because the Unix backend doesn't understand the alias. From Terminal enter these commands with your values: sudo rm -dr /Users sudo ln -s /Volumes/YourOtherPartition/Users /Users So, let's say that you actually did do a fresh install of Mac OS X and want to reconnect your home directory. It's simple, just set the values in NetInfo Manager and create the symbolic link again. Very simple! ### When Things Go Wrong While I never have had trouble, sometimes new user accounts don't create the home directory. This is a simple fix that can be accomplished with a few more Terminal commands. sudo cp -R /System/Library/User\ Template/English.lproj /Volumes/YourOtherPartition/Users/shortname Then you need to jump into NetInfo Manager and set the home value to the new location. You should be good to go from there. ### Wrapping It Up Will you notice any performance gains from this? I didn't notice any. I merely like to have my Users folder on a separate hard drive because it makes upgrading and formatting my system easier. I probably format more often than most because I like to have a fresh system for doing new MacZealots tutorials though. If you have any more tips to offer to readers, leave them in the comments.

Justin WilliamsJustin Williams is founder and chief author for MacZealots. He switched to the Mac almost five years ago hasn't looked back since. When not blogging or coding, you can find him watching copious amounts of TV. Justin can be reached at

Reader Comments (31)

DISCLAIMER: The views expressed below are those of their authors and not necessarily endorsed or supported by MacZealots.com. In all cases, the comments provided here are offered as a courtesy and will be moderated. Any content deemed off-topic or offensive will be removed without notice. Posting a comment here boils down to two things: 1.) Think before you type 2.) Respect the thoughts of others. See our commenting guidelines and/or privacy policy for more information.

1 Alex remarks:
#1) On May 4, 2005 3:10 PM

What happens to your Applications? Do you end up having to re-install them each time you re-install the system (which would be a pain), or can you move the Applications folder to a different partition as well?

2 Woody remarks:
#2) On May 4, 2005 8:53 PM

Great article. I have an empty drive in my system right now, and I’m thinking of putting Tiger on it when I upgrade, rather than on my current primary drive. I’d like to leave my /Users directory on its present drive. So now I know that all I have to do is the NetInfo/symlink thing! Now, how to get Panther off the old drive? Can I just rm everything except /Users? Once I’m booted into Tiger, of course.

3 Jason remarks:
#3) On May 5, 2005 1:25 PM

Wow! I am not even a Mac user and I was able to follow these directions to set up my fiancee’s PowerBook on a double partition Tiger install. This is great! It’s always best to have data and OS on different partitions. Thank you!!!

4 Eric Carr remarks:
#4) On May 9, 2005 5:13 AM

RE applications, try to keep them in User/me/Applications or /User/Shared/Applications.Then they go along on the new /User partition when one reinstalls the OS on the OS partition.

5 Jason remarks:
#5) On May 9, 2005 7:50 PM

Does this mean that in OSX apps don’t install things like dlls like with Windows? Are all programs stand-alone apps like this? If so, that’s so cool!

6 David remarks:
#6) On May 10, 2005 2:44 AM

What happens to the links in Finder’s sidebar? If I click on the shortcut to my Home, Documents, Pictures, etc folders will Finder bring me to the local folder where OS X is installed or to the new drive/partition? Please be patient, Mac newbie in the house.

7 snowleopard remarks:
#7) On May 14, 2005 5:54 AM

this was very help full i was experiencing failing disk-drives ad raid 1 had to solve the problem

so i got my self a firmtec external sata drive kit and two Hitachi 7k250 (450€ total)

by the way that kit is silent much better than my Quicksilver and it beats my fire wire external drive

than i set up a striped disk array in tiger (it has auto rebuild now)

now i had to move my user directory mmm normal copy did not work so i googled up this page

and went to work or better put my mac to work

but first i have to mention that i am dyslectic as hell so comandline thing’s are not for me

but i know terminal is drag and drop aware so i copy paste

sudo ditto -rsrcFork -V /Users /Volumes/YourOtherPartition/Users

so i replaced YourOtherPartition wit my raid-drive name and the mac went to work

result not a thing except missing 30gig from my start up drive (but i cant find it in the finder)

so wat now mmm some drag and drop thing

my solution was paste

sudo ditto -rsrcFork -V /Users

in to terminal

than i made a user folder on my raid dive and drag the folder to the command line and (sound ofmagic )

there was the exact location of the folder hit enter and it works cool (lots of happy sounds )

and the rest was easy

im going to do the same wit the application directory

an i have a idiot-proof backup drive

8 Martin remarks:
#8) On May 16, 2005 8:02 AM

Sidebar Links - remove these before doing the move, if not they are marked with a little stop sign since they will still point to the old home directory.

iDisk - make sure you remove the local sync option before doing the move, and then recreate (if required) the local copy after the move, if you don’t the new location will not have permission to access iDisk.

9 Jay Olson remarks:
#9) On May 17, 2005 8:32 PM

Has anyone used this as a mobile home directory solution? I am attempting to use this procedure to move a home directory to a firewire drive which will be accessed by two different computers so that the user can have a consistent environment in both locations. Unfortunately, a remote login solution will not work in this case so the firewire option was the best I could come up with. Can anyone think of potential pitfalls with a mobile firewire home directory?

10 Dave Kreutz remarks:
#10) On May 24, 2005 12:23 PM

Jay,

I was looking into the same thing, and found some helpfull information on Macosxhints.com.

http://www.macosxhints.com/article.php?story=20050215110210846

Haven’t had the time to delve into it, but they were discussing the problem of what happens when the account is accessed when the drive isn’t attached. There is some workaround for this situation so it won’t break the link to your Firewire User account.

Good luck

11 Mark Smit remarks:
#11) On May 25, 2005 8:47 AM

I have worked with an external FireWire drive for a number of months with no issues. I simply copied the home directory to it, renamed the original home folder (while logged in as a different admin user, of course), and set a symbolic link to the external directory.

I recently moved back to having my home directory on the PowerBook drive for two practical reasons: I frequently need to share files using the FireWire drive and I did not want to log off every time. Also, more importantly, I was unable to find a way to automatically unmount the external drive when logging off. I found it to be a pain to log off and then log in as a different user to unmount the drive every time I needed to move it.

Has anybody found a way to automatically unmount the drive containing the home directory during logoff or while in the login window?

12 Jay Olson remarks:
#12) On June 7, 2005 8:13 PM

Thank you for your informative replies. I did in fact setup my client with her home directory on the firewire drive. Inevitably, she ended up logging in without the drive mounting first and a phantom volume was created and she was very confused. I walked her through fixing this situation over the phone. However, some time later, the home directory on the fw drive vanished. She claims to not have deleted it. I have no way to tell. The nice thing about leaving a home directory in its original place is that it can’t be deleted by the user or any other user on the system.

BTW, the macOS X hints article included the interesting technique of leaving the local home directory intact and having multiple entries for home in the Netinfo database. This would prevent the creation of the phantom database and would be useful for the poster’s purposes, but for moving between two machines regularly, I think it would just increase confusion.

I am now making a new attempt by putting only the desktop, documents, photos, and music folders on the fw drive.That way the drive would not necessarily need to be mounted before login in order for the login to proceed smoothly.

13 joe remarks:
#13) On June 19, 2005 12:11 PM

So when the Users directory is no longer on the partition with OSX, how can I repair permissions?

Specifically, I found when buying a track from Apple Music Store with iTunes, permission for the directory where my Music Store authorization info is messed up.

14 david remarks:
#14) On June 20, 2005 1:00 PM

This hint worked well for one user, but I ran into a problem with a second user on the mac. It lost all priviliges for all the folders in its home. (though it can log in)

any thoughts on that?

15 Brandon remarks:
#15) On June 21, 2005 7:59 PM

I have been reading into this lately and about to take the plunge. However, I have read in more than one place that this setup makes MS Office 2004 unhappy. Has anyone had any experience with this?

16 Justin Williams remarks:
#16) On June 21, 2005 8:04 PM

I am using Office 2004 with no problems and have been for months if that’s worth anything.

17 Rayne remarks:
#17) On June 22, 2005 11:29 AM

I’m a newbie and thinking of doing this for the simple reason that my internal hard drive doesn’t have enough disk space for everything. I’m currently using a network and storing everything on a PC, but I don’t like doing that. I only really want to move Documents, Photos, Music. Don’t really need to move anything else or any other users (there’s only 3 and mine is the most critical). Can I do something similar to move just those 3 directories to the external drive?

18 Tim Foelker remarks:
#18) On June 25, 2005 3:01 PM

Nicely done, Justin. I found this article while searching for my “path” to Tiger. I want to start with a fresh system, even a fresh User directory. I don’t want to weed out all the old crap that is now choking my Powerbook.

Archiving the User directory is easy and I can retreive discreet data files at will from the external archive, no sweat. However, I’ll have a huge archive of emails and addresses and tunes and photos that I’ll want to keep archived, but handy, just in case. I don’t have the time to selectively rearrange this data, and I don’t want to import it all into Tiger. I just want to be able to get to it fast if I have a need.

I’m thinking of using the descirbed technique to create a “archive” user with its home pointing to the external archive of my old home. Then if I need to lookup something I can pop over to the “archive” user account (fast-user switching, anyone?), lookup the info, copy it, forward it, or export it.

For those to whom that made sense, do you see any drawbacks to this technique? Can I just create this “archive” user in Tiger, change the name in the archived Panther User directory to match, and point to it with NetInfo? Or, is there a different approach to achieve what I’m after? That is, a fresh system free of old data with the ability to retreive bits of “non-discreet” data as the need arises. In a sense, selectively rebuilding my home directory after upgrading to Tiger, rather than before. And safely knowing all my old stuff is there without having to reboot into Panther to get at it.

19 Tyler remarks:
#19) On June 25, 2005 5:34 PM

I was having problems with permissions and font’s being corrupted in MS Office after I tried this technique.

I think one of the advantages of this way versus the archive is you have a continually updated Users folder as opposed to an archived one whenever you had the chance.

20 Brandon remarks:
#20) On June 27, 2005 1:34 AM

Tyler,

Could you tell us which version of MS Office you are using? I tried this method and MS Office 2004 had no problem with the fonts.

21 Andy Leppard remarks:
#21) On July 10, 2005 8:51 AM

I tried this move and everything was fine and dandy. Nothing was out of place EXCEPT I kept getting problems using Firefox. The browser could not quit, and could not execute javascript. I didn’t know what was happening, so I moved evrething back, then just moved my “data” folders (ie. Documents, Movies, Music, Pictures and Sites). Now everything seems to be OK with Firefox.

22 TommyTheKid remarks:
#22) On July 12, 2005 9:19 PM

I want to do this, but isn’t there a way to just mount the filesystem in /Users so that I don’t have to change every user in NetInfo? I come from a Linux/Solaris background, and the file I would change is /etc/vfstab or /etc/fstab .. the closest thing I can find seems to indicate that its not used, so where would I tell it to mount /dev/disk0s12 on /Users :)

‾tommy

23 andyd remarks:
#23) On July 18, 2005 7:02 PM

Are there any programs out there that will fix permissions on users whose home folders are on partitions other than the startup disk? Disk Utility won’t do it and, let’s face it, in a multiple user system such as the one I am in charge of, with users logging on from windows and macs, both remotely and locally, there will eventually be permissions problems.

A.D.

24 Greg remarks:
#24) On August 15, 2005 7:43 PM

Hi, I am trying to make the full switch to Mac after 2 years of a dual platfom network (it’s been hard to give up windows, it does what i want it to do configuration wise) I just moved my home dir to a second drive following the instructions above, everything worked fine except when i boot up, all my startup items wont start up. Anybody now why? I am new to unix and not sure what i did wrong. I am using a G4 with Panther 10.3.9

thanks for any advice in advance

-Greg

25 Aaron remarks:
#25) On August 22, 2005 11:04 PM

I read an article somewhere (can’t find it now) that used this method for storing the /User directory on an iPod for very portable use on multiple systems.

26 SusanMZ remarks:
#26) On August 23, 2005 2:28 PM

Sorry, my email was commandeered and sent off before I finished it. Can you point me to someone, preferably an old-fashioned book, that can explain what Terminal is and how to use it? It sounds like the article above is what I was looking for—wanting applications and os x, now I can’t remember which “cat” I have, think it’s panther—second to last one anyone—on my G4 hard drive, but all else that matters, music, photos, slideshows, video and even emails to reside on external LaCie drive.

I’m a real novice even at partitioning. Never was even asked that with PC. Don’t get me wrong, now that I’ve had the best, there’s nothing but all the rest. So, how can I do what I said above for reasons I started to explain when my email whisked away before I was done? Is there a macnovice site—then again that might be the blind leading the blind. Any help much appreciated, sorry you’ll have to make your way through security system. Think you’ll all probably understand though.

27 Anne remarks:
#27) On August 24, 2005 12:01 PM

I’ve done something similar to this in the Macintosh Lab on our university campus. I discovered the sidebarlists preference problem and fixed that before I found your site, however I still have one issue that I have no idea how to get around.

I have aliases to specific network volumes in a folder on the Desktop. I created them on a “student user” partition then copied them using Terminal to /System/Library/User\ Template/English.lproj/Desktop. That should, in theory, make them available for every user who authenticates using Active Directory when their home directory is created locally. What I’ve found is that the aliases don’t copy correctly.

I read in one of my books that files with resource forks don’t copy correctly using the “cp” command. OK, so I tried creating the links as internet locations (typing the connection address in a text document and dragging and dropping the address onto the desktop). That doesn’t work either.

Does anyone have any idea how I can remedy the situation?

Thanks,

Anne

28 anonymous remarks:
#28) On October 19, 2005 5:52 PM

WARNING:

This method is most likely incompatible with FileVault, as your real data is in a sparse image in the folder one level up with a dot .username in front of it.

The UUID fstab method is most likely your only option in this case.

http://www.macosxhints.com/article.php?story=20030227194830916

First, though I think you should force mount all drives at startup.

http://www.macosxhints.com/article.php?story=20031103155828117

29 David bianco remarks:
#29) On November 23, 2005 6:55 AM

I’d really like to setup my Applications folder on its own partition. Separate from OS, separate from Users. Has anyone done this before? what’s your experience and can you send some instructions my way….

Thanks, David

30 Sam remarks:
#30) On January 4, 2006 9:36 PM

Hi

I followed the instructions on this page to move my /Users to a new volume on my firewire drive. The sudo commands appeard to work ok, now I have all the /Users files in the new volume. However after I used Netinfo to change the home property to reflect the new location, logged out and tried to log in, it tells me that I am unable to log in at this time.

My new partition name has a space in it, and I used single quote marks ’ to specify it in this way in Netinfo:

/Volumes/’WongZone Data’/Users/samwong

Could this be the cause of the problem, and how do I fix it now since I can’t log in? Help appreciated please!!

Thanks in advance!

regards, sam

31 Michael Mennenga remarks:
#31) On March 23, 2006 6:00 PM

This seems like the trick, but I am a new convert to Macs and am a bit intimidated.

I just added a 200 gig Maxtor drive that has nothing on it. I would like to move the home directory to this drive and then reinstall a clean vers of Tiger on the factory 80gig. (As the instructions suggest)

My only question is will all the programs and any problems therein also be saved? I have some strange things going on with a couple of my programs. (Mail and Firefox) They are giving problems and I am worried that if I do this and add a clean install, the problems will just continue.

Any advice or help would be…… Helpful?