Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Before I start asking my question, I would like you to know that I am aware of the "Different linux distros sharing the same /home folder?" question already asked on this website. It did not quite answer my question though, and as it's too broad I don't think it ever will.

Is it possible to share the user directory between Ubuntu and Arch, and how to make that work? I'm talking about what's known as ~.

I already have Ubuntu installed, but I am really annoyed by outdated packages. I would like to run them next to each other so when I need to use new software I can use ArchLinux. I could just switch completely to ArchLinux, but I don't want to take any risks. (Maybe I'll hate it)

Just as a sidenote, my /home is on a different partition, but my users' directories also encrypted.

share|improve this question
add comment

2 Answers 2

No problem. This is the easiest to do if home is a separate partition, but in any case, it can be done. Just put the mount in your fstab (regular mount if it is a partition, mount --bind if it is a subdirectory on another mounted hard drive).

The only catch is, all the users need to have the same uid's, otherwise the ownership will be wrong.

share|improve this answer
    
How to fix the user IDs? Will it work if my home directories are encrypted? –  Jeroen Bollen Mar 11 at 21:26
2  
stackoverflow.com/questions/18248056/change-user-id-in-linux Encryption just means you need to do the same thing you did in the other installation to decrypt it. –  orion Mar 11 at 21:27
add comment

You have some problem:

  1. usernames and groupnames store with UIDs and GUIDs suppose you have username joe with id 1000 on ubuntu machine, and username joe has been stored with 1003 on Arch machine.
  2. some dot files contains some configuration files , you have separate version of application on two machines.
share|improve this answer
    
I only just realized, I also have my /home encrypted, so I'm guessing this is a no-go. –  Jeroen Bollen Mar 11 at 21:24
1  
encryption shouldn't be a problem, it doesn't depend on the os but the credentials and key/passwords that can be transferred or reinitialized. –  orion Mar 11 at 21:26
1  
You only just syncronize /etc/passwd and /etc/groups. –  Mohsen Pahlevanzadeh Mar 11 at 21:28
2  
Exactly. You can clone (copy or just mount --bind) the /etc/{passwd, group, shadow, gshadow} between distributions if they really have the same groups and users. If there are features specific to the distribution, just copy the relevant lines. –  orion Mar 11 at 21:43
    
Config files shouldn't be a problem, it's rare that the config becomes incompatible. –  orion Mar 11 at 21:53
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.