Can't share /mnt/volume Other Part

Longman, Bill yellowdog-newbie@lists.terrasoftsolutions.com
Wed, 2 Jul 2003 13:44:59 -0700


> Very interesting answers you all. I actually had the same problem for 
> quite some time.
> 
> Please let me take the chance to ask a little more...
> 
> I know it is possible to change the default "home" directory for all 
> new users with
> % useradd -d /other_home/newuser
> 
> 1) but is it also possible to make that /mnt/hfs_volume the 
> default new 
> home?
> 2) how can root move all existing users files and directories to this 
> new home without changing current "health"?
> 
> Should have I asked this in a different mail?
> Sorry but I thought we could go a little deeper.

It's actually very simple to keep all your users in their own partition. It
gets more complicated, however, if you want to move them, obviously.

All it takes to make a new home filesystems is an entry in the fstab. Just
put /mnt/hfs_volume in there to mount at /home and, presto, you should be
ready to go.

Caveat administratiori, however. If you've got user files living in the
existing /home directory (which is actually a part of the / filesystem),
then they'll get covered up by the newly-mounted /home filesystem.

If you want to copy an entire tree, the way that I always do it is with
cpio.

cd /home
find . -print | cpio -pdumv /mnt/new_home

If you run this as root, it will keep all the file permissions and
ownerships intact.

Then you can do the so-much-fun-until-you-run-out-of-breath command below:

rm -rf *

That gives you your space back in the root filesystem. (Please make sure
you're still in /home before you press Enter....caveat admini....)

Then mount your shiny new home filesystem.
cd /
umount /mnt/new_home
mount /home

All in a days work.