Can I change the location of the "Home" folder?

Dazzla

Icon specialist
Simple question, simple answer (I hope).

I've just repartitioned my mac so I can store all my Documents, music, movies etc on another partition.

I have 2 partitions, 1 x 10GB (System) and 1 x 30GB (Documents). I am wondering if I can move the location of the "home" folder to be simply the Documents drive.

Thanks


dazzla
 
Simple question, yes. Simple answer, no. :(
Here is a fairly thorough discussion of what you will need to do, and the pitfalls involved in the process.
 
easy
sudo niutil -createprop / /users/username/home "/path/to/new/home"

Or you can navigate through Netinfo Manager. Commandline is faster and it's good to learn.
 
Originally posted by genghiscohen
Simple question, yes. Simple answer, no. :(
Here is a fairly thorough discussion of what you will need to do, and the pitfalls involved in the process.

I disagree. I am using /Volumes/Disk2/Users/gary as my home and have for over a year now. I have NEVER had a problem. You just need to properly assign permissions.

sudo niutil -createprop / /users/username/home "/path/to/new/home"

mkdir -p /Volumes/Disk2/Users
chown -R root:wheel /Volumes/Disk2/Users
chmod -R 755 /Volumes/Disk2/Users
cp -R /Users/bob /Volumes/Disk2/Users/
chown -R bob:group /Volumes/Disk2/bob
 
Hey, kewl! I read that MacFixit thread some time back, and decided I didn't want to mess with anything that complex.
I may give your method a try. Just hope that 10.2 doesn't screw things up...
 
Here are some considerations.

/Applications is ONLY used for programs installed when the OS is installed. Since I am the ONLY user on the system, everything goes into ~/Applications. So essentially, all non-OS data is on /Volumes/Disk2.

This allows a full OS resintall to be trivial. I was actually able to put this into practice recently. My 20gig OS drive experienced a hardware failure and Aqua could not come up at boot. I was stuck at the command line. I found out the disk was bad.

No problem. Put in a new disk, install the OS. After the final reboot I am logged in as "gary". The first thing I do is enable the root user and login as root. Once I am in, I simply launch Netinfo Manager and change my home directory to /Volumes/Disk2/Users/gary.

You will want to keep the original directory in /Users so you can see what the skeleton permissions need to be if you move a user later.

Once I change my home directory over while logged in as root, I just need to logout and login as myself and I have my original profile.

To make things easy I have a weekly cron job that backs up all my unix config files, such as /etc/hosts.allow, /etc/hosts.deny, /usr/local/samba/lib/smb.conf, etc. I even do a "crontab -l >> root.cron" so I save the contents of my cron files.

If you take great care, a system recovery becomes trivial.
 
Back
Top