[Sussex] Another place called home

Steve Dobson steve at dobson.org
Thu Jan 20 14:30:09 UTC 2005


Angelo

On Thu, Jan 20, 2005 at 01:58:39PM -0000, Angelo Servini wrote:
> When running different distro's
>  
> Would it be possible to have a different partition for 
> /home/username/documents
> If so, how does one implement the linking to it.   I think it would be
> FSTAB  I assume?
>  
> ie.
>  
> /dev/hdc?      /home/username/documents  xxxxx xxxx xxxxx
>  
> What do you think?
>  
> This is so that if I scrub out a particular distro I can always get
> back to my docs.

I'm not quite sure what you're trying to do here.  

A partition in just a set of files to be mounted somewhere.  It makes 
no difference to the kernel where that partition is mounted - in system
space (e.g off /usr) or in user space (off /home).  You can even have
mount points on directories under mount points like this (in fact I do):
    hda1    /
    hdb2    /usr
    hda2    /usr/local

An you need to make sure that / is mounted before /usr, and /usr is
mounted before /usr/local.  I must admit that I don't normally mount
disk space in a users directory, but I have in the past when a project
has required a vast amount of data space and that was the most convenient
place to mount it.

> Its probably not a good idea I think to have /home/username on a
> different partition because the differing distros may not link libraries
> in the same place?  is this correct?

In Linux there are two ways (I know of) to link to libraries.  Edit
/etc/ld.so.conf, and by setting environmental variables like 
LD_LIBRARY_PATH.

LD_LIBRARY_PATH is useful for users to extend the places to look for
shared libraries when they are running programs.  But for programs
running as root (i.e set {U/G}ID as root) LD_LIBRARY_PATH is ignored
as the user could placed a trojan system library in the path and that
would be used rather than the trussed system one.

ls.so.config is a list of directories that the system will automaticly 
search for shared libraries.  If you configure a user controlled
directory then that user now was the ability to place a trojan system
in that directory that will be used before correct system one.

Hope this helps
Steve




More information about the Sussex mailing list