Linux – how to deal with shared home directory on linux

linuxnfsshared-folders

situation is as follows:

  • home directory is on nfs share A: /home/me
  • workstations a, b, c, … share that home directory: /home/me is a link to A:/home/me
  • all workstations are used at the same time

example:

NFS share A has

  • /home/john
  • /home/anne

Workstation a has

  • /home/john -> linked to NSF Share A /home/john
  • /home/anne -> linked to NSF Share A /home/anne

Workstation b has

  • /home/john -> linked to NSF Share A /home/john
  • /home/anne -> linked to NSF Share A /home/anne

this tends to give all kind of weird problems, because all settings directories (.matlab, .kde, Desktop etc, possibly trash as well, didn't check that) are all shared and written to/read from at the same time. Furthermore the configuration of the machines can be quite different, so putting shortcuts on the desktop turns it into one big mess since half of them are not accessible on all machines.

Basically I'm looking for an easy to manage and effortless way to cope with this, something in the veins of how it's done on windows with the roaming/local profile thing. The requirements would be:

  • the root of the home dir, and some other folders I can select, as well as some setting dirs like .svn and .ssh, must be the same on all machines
  • pretty much all other setting setting directories can be local to each workstation, but should be on the nfs share as well
  • ideally I would also have some application that allows me to do things like 'take all settings from kde's Konsole application, and make them the same on all my workstations'

Best Answer

I would give each use their own separate home directory. Use permissions to lock down settings for some applications and use hardlinks to make common settings.

I don't think you can get finer granularity than that. I imagine that applications that expect to be able to change (some of) their settings may fail in unexpected ways when users attempt to change something - so careful testing is needed.

It might be instructive to read what JWZ did. Though his use case is more extreme.

Related Question