Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Move the Users folder to a new partition System
[Editor's note: There's a previously published tip on moving the Users' folder - but I felt this alternate method merited posting on its own. Check both tips if you're interested in moving your Users directory to a new drive or partition.]

I have three partitions on my dual G4. One for OS 9.1, one for OS X, and one I wanted to use as some file repository. However, OS X does not allow guest-sharing of files outside of the Public folder. So, I decided to try and have MacOS X recognize the other partition as the Users directory. This is what I did:

- su-ed to root
- gnutar cf users.tar Users/
- mv users.tar /Volumes/TargetDisk/
- cd /Volumes/TargetDisk/
- gnutar xf users.tar
- rename original Users folder to Users-old
- cd /
- ln -s /Volumes/TargetDisk/Users Users

Now a symbolic link exists where the original Users folders resided. Then, you have to log out and log back in again. After re-logging, you should see that the system recognizes the Users folder on the other partition as the one with your home directory.

The only problem I had, was that some aliases may not work anymore. For example, I have an alias to the Favorites.html in OS9.1 in my Explorer preferences. That one, I had to reestablish. Apart from this, it works smoothly.
  • Currently 2.67 / 5
  You rated: 5 / 5 (3 votes cast)

Move the Users folder to a new partition | 15 comments | Create New Account
Click here to return to the 'Move the Users folder to a new partition' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
resource forks
Authored by: sven on Jun 20, '01 03:37:22AM

You probably killed your aliases because tar does not copy resource forks. Since most of the data files in OSX are "flat", problems are probably minor, but if you also keep OS9 files in your home directory you should be careful.

It might be safer to use the Finder (maybe even the OS9 Finder) for copying. There's also the CpMac tool in the /Developer section that respects resource forks and I've seen a hfstar floating around but I haven't tested either.


[ Reply to This | # ]
Have a feeling not 100%
Authored by: maguirer on Jun 20, '01 01:08:25PM

I seem to recall such a proposed solution in the previous article that you linked to. I don't recall that solution working 100%.

I'd be interested to see if you could create a new user using the Mac OS X Multiple Users utility (i.e. have it create a user folder with all the default Library and Preference folders). Maybe Apple has fixed this in later updates, but I don't recall this method working with earlier versions...

[ Reply to This | # ]
Have a feeling not 100%
Authored by: adriaant on Jun 21, '01 12:18:54AM

I created a new user to test it and it works. A new user folder plus necessary links is created in the Users directory. No problems here.

[ Reply to This | # ]
Have a feeling not 100%
Authored by: scottboone on Aug 02, '01 03:56:11AM

If you got it to work, then congrats, because it doesn't on my install of 10.0.4. If I go into the Users System Prefs Panel and create a new user, the program ACTS like it is making a new user, but the ~userhome and its assorted files are never created...a bit of a pain to say the least. I bug filed it with Apple.

Clearly the best and most Unix solution is to have the system "mount" a partition on the /Users point. But Apple has things so screwed up that I can't edit FSTAB and get it to work (NetInfo ignores fstab, unless you do the niload command--plus it has been stated elsewhere that since OS X loads devices asyncronously, one is NOT guaranteed that the /dev labels will be consistent through restarts...I would think that the slice labels would be though) In the other (the April postings) nrich posted about altering the Disks StartupItem, which I think is the most promising idea yet, but I'm not sure that his instructions are complete, as he never has you go back and alter the /etc/hostname file to re-enable autodiskmount and automount (so the StartupItem shouldn't ever startup automount).

Does anyone have this figured out 100%?

I asked an Apple OSX developer about it a MacWorld NYC, and he asked WHY I wanted to do it--why do they always ask dumb questions like that? I responded that since I ran a Beige G3 and I was stuck in the first 8GB, I wanted to move my /Users to my 32GB second partition...afterall, isn't being able to DO THAT sortof a reason in and of itself to use Unix? This jack@ss' solution? Buy a new Mac. What a jerk.

[ Reply to This | # ]
Try 'ditto'
Authored by: foamy on Jun 20, '01 01:43:33PM

I'd use the ditto command to move all of the data, then do the ln -s. I'm sure the resource forks get lost when tar'ing.

Use something like
ditto -vR /source/ /target/

[ Reply to This | # ]
Try 'ditto'
Authored by: BraindeadMac on Jun 20, '01 06:56:14PM

you have to use the -rsrcFork option as well with ditto;

ditto -v -rsrcFork /source /destination/

[ Reply to This | # ]
why not just use NetInfo Manager?
Authored by: rgoer on Jun 21, '01 09:34:25AM

Any admin-level user who also has root access can use the utility 'NetInfo Manager' to accomplish this same task, and without any of the (small) problems you have encountered.

1. enable root user
2. select any user whose home directory you wish to move to another partition
3. edit the properties of that user
4. in the 'home directory' field, enter the path to the new home directory

A new 'users' directory will be created one level up from the path (if I remember correctly) and everything should work fine.

[ Reply to This | # ]
why not just use NetInfo Manager?
Authored by: adriaant on Jul 31, '01 04:41:24PM

Good tip!!! That should be a much better idea!

[ Reply to This | # ]
why not just use NetInfo Manager?
Authored by: scottboone on Aug 02, '01 03:30:48AM

Unless you have figured out a way to get NetInfo Manager to change the Users folder for all current users and any "new" users, this really doesn't work. Otherwise I have to change EVERY user I would be much easier if I could merely specify a new Users directory in one place, which is what the workaround SORTA allows.

The NetInfo Manager thing will work, but you will get mighty bored using it if you have a lot of users on your system.

[ Reply to This | # ]
Software Update doesn't work
Authored by: mikejuni on Aug 02, '01 05:17:27AM

If you are using HFS+ in your boot partition, which originally have your user folders, your software update will probably failed after you have move your user partition to another one. This is probably because of broken alias, but not resource fork.
I've previously installed OS X to a UFS drive and a HFS+ drive, only HFS+ drive have this issue.
If somebody have a solution, please let me know.
One thing to recommand apple : Let user to select User/Application mount partition in 10.1 because there is a lot of users who wants to do this.

[ Reply to This | # ]
Moving Users to another partition
Authored by: Grot on Aug 03, '01 04:29:02AM

I also moved my Users directory to another partition. I duplicated it by doing a Finder copy while booted from mac os 9.1, deleted the old /Users directory and then rebooted into single user mode and made the symlink with "ln -s /Volumes/Users /Users". The catch was that after I did this, kept forgetting my mail rules. After opening the Mail prefs I determined that Mail was correctly saving the information, but not correctly retrieving it on the next boot. A correspondent on the Omnigroup OSX list recommended the following:
1) Creating a second user with admin privileges
2) going into NetInfo Manager and authenticating myself and changing the home directory for the second user from "/Users/<username>" to "/Volumes/Users/<username>".
3) Log in as other user and do step 2 for the first user.
This has worked beautifully, but has resulted in the system asking me for my keychain password. I don't think this is a bad thing, so I'm very happy with it.

[ Reply to This | # ]
mail not working propery in not admin
Authored by: trozo on Sep 16, '01 07:22:21PM

I moved the Users folder with netinfo, and everything seems to work fine with my admin user, but for other non admin users, is not capable of opening the mailboxes...

Also, I find strange the fact that other HDs (the ones in the /Volumens folder) change owner to the actual logged user. I find this a bit disturbing. I have been unable to change the owner of these HDs or the folders inside with chown...

Any help with this would be greatly appreciated.


[ Reply to This | # ]
The best way to go about this..
Authored by: hannibal on May 05, '02 04:07:09PM

It appears autodiskmount does not allow a location to be specified as the mount point for each device in the current release of Darwin. However, the version in CVS will respect locations defined in fstab - I imagine we'll be receiving the enhancement as part of 10.2.

As an interim measue, I made a copy of the /System/Library/StartupItems/Disks folder and placed it at /Library/StartupItems/Disks . The item at /Library takes precedence over the one under /System , so it can be customized without having to modify any configuration files provided by Apple.

I added commands to mount my Users and Applications partitions to the Disks script, before starting the autodiskmount daemon. Since they are already mounted, autodiskmount will simply ignore them.

I then booted into single user mode and used ditto to move the existing data under Applications and Users to the new partitions.

When 10.2 is released, it should be possible to add appropriate entries to fstab and remove the /Library/StartupItems/Disks folder and achieve the same result cleanly.

[ Reply to This | # ]
Authored by: lastobelus on May 07, '02 06:37:40PM

This took me a few minutes to figure out...If you change your startup disk with the preferences panel, the device labels change and you have to modify your mounts. IE, what was /dev/disk0s10 may become /dev/disk1s10

I hit this because I had just installed another system on another disk prior to setting up the mount for Users on the old system. The startup disk was set to the new system but I had used the option key when booting to boot into the old system. However, this does not make the disk containing the system you're booting into disk0. Setting a startup disk using the startup disk preferences pane does set that disk to be disk0.

Which seems silly to me. They should be labelled by where they are on the bus, or at least in some way that remains the same.

[ Reply to This | # ]
Authored by: lastobelus on Jun 03, '02 01:48:11PM

Actually, the device labels are random, because as someone mentioned elsewhere, devices are discovered asynchronously.

Which makes it difficult to reliably mount the Users directory from another disk.

[ Reply to This | # ]