[SOLVED] Can one /home be created to serve several distros?


Results 1 to 14 of 14

Thread: [SOLVED] Can one /home be created to serve several distros?

  1. #1
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978

    [SOLVED] Can one /home be created to serve several distros?

    Think I ran into some permission problems in trying to mount a partition as a common /home for several distros.

    Just wonder if there is some rules to adhere to.

    For example I manage to delete the content of /home and mounted a partition as /home successfully in FC6 for access by an ordinary user. I then installed Suse 10.3 and using the partition as /home again. It worked in Suse but failed in FC6. I then installed FC7 using the same partition as its /home and now Suse refuses to load because its KDE doesn't like it.

    The partition can be read/written by root but I am trying to go about it as an ordinary user with the same user name in each distro. That backfires. I am asking for a pointer in order to reduce the reading I have to do.
    Last edited by saikee; 06-26-2007 at 02:20 AM. Reason: Solved
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  2. #2
    Join Date
    Jan 2004
    Location
    boston, mass USA
    Posts
    1,878
    yes.

    give the user the same UID should do it

  3. #3
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    It seems the UID is changed whenever an installer takes over resulting some files become foreign to the previous and current owner.

    For example it started with owner "root". I then changed it to "saikee" to make it work. FC7 changed it to "1000" .

    I am looking for the correct setting for the "group" and "SELinux". The latter may be causing the trouble.

    The /home has been mounted successfully in the latest FC7 but many files are locked. The at message at log in was

    "User $home/.dmrc file is being ignored. This prevents the default session and language from being saved. Files should be owned by user and have 644 permissions. User $home directory must be owned by user and not writable by other users."

    Other distros which worked previously can't log in as saikee any more.

    The partition is Ext3. In the past I used fat32 and log in as root to bypass the permission problems. I think I am ready to bit the bullet to try working as ordinary user whenever possible.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  4. #4
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    I think I am half way there but the UID doesn't seem to be the ticket.

    I manage to mount a selected partition as /home for Mepis, Suse and Ubuntu but it fails for Fedora.

    The problem seems to be related to the default gid for "users" is 100 for Mepis, Suse and Ubuntu but 500 for Fedora. Thus the same partition mounted in Fedora is rejected by the same user because the users gid not matching.

    I haven't figured a way out to overcome this yet as the default gid cannot be altered and mounting the partition by a self-imposed gid number so far failed.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  5. #5
    Join Date
    Jan 2003
    Location
    Zurich, Switzerland
    Posts
    2,657
    You also need to be careful when using the same /home partition for several distros because the configuration files in each users /home folder can create a real mess between the various apps.

    "What can be said at all can be said clearly, and what we cannot talk about we must pass over in silence."

    Tractatus Logico-Philosophicus by Ludwig Wittgenstein (1889-1951)

  6. #6
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    I know I am walking into a mind field here and hence my anxiety wanting to know if it is doable or not.

    No doubt when different distros are using the same software, like Firefox for example, but with different versions and so different settings (may overwrite each other) will send me to hell eventually. However I do want to get hold of the file permission issue by the horn. At the moment I am using only one ordinary user in every distro (aprt from root).

    It is all part of a learning process in Linux.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  7. #7
    Join Date
    Jan 2003
    Location
    Zurich, Switzerland
    Posts
    2,657
    Quote Originally Posted by saikee
    No doubt when different distros are using the same software, like Firefox for example, but with different versions and so different settings (may overwrite each other) will send me to hell eventually.
    You can escape this doom with a smart strategy. I don't remember who posted this (and the credit goes to), but one user in this forum once explained he has a separat partition for his files that he mounts e.g. as /myfiles After that every distro on his box has its own /home whereas he places a link in /home/someusername This way all config files stay seperate for every distro while he always finds his data in the same place.

    "What can be said at all can be said clearly, and what we cannot talk about we must pass over in silence."

    Tractatus Logico-Philosophicus by Ludwig Wittgenstein (1889-1951)

  8. #8
    Join Date
    Aug 2001
    Location
    Somewhere, Texas
    Posts
    9,627
    For the permission problem the easiest is to make the users on all the distros have the same UID. File permissions are not determined by the owners name but their UID.

  9. #9
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    I am having a reasonable amount of success and have been able to mount the /home in a few more distros by standardising the UID. This was done by the usermod command in root console.

    I am still a bit puzzled by how each of the following affecting the permission

    (1) Group UIG. Some groups have their own default UIG numbers which can be different between distros.

    (2) Group names - No so sure what part it plays in the permission.

    It appears as long as the partition can be mounted successfully as /home then an ordinary user, with the matching user subdirectory inside, can use it. The only sure fire way to mount the partition successfully seem to have the username, uid, group name and gid all matched. However the method of mount the /home may be important too.

    I haven't tried out the symbolic link approach suggested by Parcival yet.

    Thanks for the helps. I know I can't rush it through as the file permission is the very basic of the Linux security system.

    It is a huge reward for me to be able to use one common /home. As I could use the Internet bookmarks the moment a distro has been installed, check the sound by playing the existing mp3, try out the saved movies or use the newly installed Linux to mount a previously downloaded iso image of another distro for installation without burning a CD, all without log in as root.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  10. #10
    Join Date
    Apr 2001
    Location
    SF Bay Area, CA
    Posts
    14,936
    Quote Originally Posted by saikee
    I am still a bit puzzled by how each of the following affecting the permission

    (1) Group UIG. Some groups have their own default UIG numbers which can be different between distros.
    The GID is the only thing that affects whether the group permissions apply.

    (2) Group names - No so sure what part it plays in the permission.
    None at all.

    For reference, here's how permission checks work:

    1) Check the file's (numeric!) UID against the process's UID. If they match, use the "user" permission bits: check for read, write, and/or execute.

    2) Otherwise, check the file's (numeric!) GID against the process's list of GIDs (both the single primary GID and all supplementary GIDs). If it matches any of them, use the "group" permission bits: check for read, write and/or execute.

    3) Otherwise, use the "other" permission bits: check for read, write, and/or execute.

    Note that other checks happen if you're trying to change ownership, or possibly the permissions. I think to change the mode, you have to either have write permission, or be the owner. To change the owner, you have to be the owner, and you can only change the owner to yourself (so chown is completely useless for normal users, unless you use it to change a file's group). Root can change ownership arbitrarily though.

    Note also that if you should have permission by this algorithm, then your issue isn't with permissions: some system utilities expect a user or group name instead of a UID or GID, and it would have to match what the utility is expecting then. But for permission checks, only the numeric value matters.

  11. #11
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    bwkaz,

    Excellent explanation! Hit me right on the head too as I am just at that level to appreciate the concept.

    Note also that if you should have permission by this algorithm, then your issue isn't with permissions: some system utilities expect a user or group name instead of a UID or GID, and it would have to match what the utility is expecting then. But for permission checks, only the numeric value matters.
    This is what I have found out too.

    I discovered some of my problems are due to the /etc/fstab mysteriously reverts back to the original form after I have amended it, resulting the /home wasn't mounted when I thought it did.

    There are a few distros doing something I was not expecting but by far the advices I have adhered are getting me to where I want. I am going to investigate deeper and learn every corner of it. No need to tell me everything as I found Linux can be "reasoned" out once the fundamentals are understood.

    Thanks again guys. Proud to be in JL.

    Not done this often but can I mark the thread solved or is this can only be done by the moderator?
    Last edited by saikee; 06-26-2007 at 02:22 AM.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  12. #12
    Join Date
    Jan 2003
    Location
    Zurich, Switzerland
    Posts
    2,657
    It can only be done by mods - with users so smart like you we need still some sort of privilege to cling to our power.

    "What can be said at all can be said clearly, and what we cannot talk about we must pass over in silence."

    Tractatus Logico-Philosophicus by Ludwig Wittgenstein (1889-1951)

  13. #13
    Join Date
    Jun 2004
    Location
    Newcastle upon Tyne
    Posts
    2,978
    It is always a pleasure to seek advice and consult the "village elders" here.
    Linux user started Jun 2004 - No. 361921
    Using a Linux live CD to clone XP
    To install Linux and keep Windows MBR untouched
    Adding extra Linux & Doing it in a lazy way
    A Grub menu booting 100+ systems & A "Howto" to install and boot 145 systems
    Just cloning tips Just booting tips A collection of booting tips

    Judge asked Linux "You are being charged murdering Windoze by stabbing its heart with a weapon, what was it?" Replied Linux "A Live CD"

  14. #14
    Join Date
    Dec 1999
    Location
    tx
    Posts
    1,190
    I like to put things I need in a separate partition, and simply create links under the same name in the distro partition.

    It's easy with Gutenberg books, music, old radio shows for amarok. etc. The next thing I want to try is .evolution

    If that works, I can process Evolution mail from any distro, and that would be neat. Not sure, but think it oughta' work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •