Is it possible to store user's home directories remotely?

7,137

Solution 1

There are several software solutions designed especially for those task, but I can suggest a simple ad-hoc solution:

  1. On server, create a single grand /home directory and share it by NFS.
  2. On each client, move following files so that they, too, reside in NFS and share between PCs. /etc/passwd - user account information less the encrypted passwords /etc/shadow - contains encrypted passwords /etc/group - user group information /etc/gshadow - - group encrypted passwords
  3. Mount NFSs at boot on each client.

However, the problem is that some quirky PAM tricks do not play along with shared user settings. Those are the cases when you need a specific software.

Solution 2

You will need more than one component to do this, and be aware that there are many ways to accomplish this;

At first you will need to have an Linux Domain Controller (Like Windows AD), to do your AAA. Then also an database server must be used to store these information (LDAP in most cases). There are "all-in-one" solutions for this like Fedora 389DS.

And then you will need a storage server with;

  • A 'private' share per user, which stores the user profile and personal data.
  • [OPT] A 'shared' share, only available for certain groups, users etc.

Here you can also chose between software like Samba (which is the one you'll find the most docs on), Open Media Vault, FreeNAS etc.

After that you will still need to look at ting such as WebDav to make your shares accessible from outside your LAN, or on mobile devices. Even then there are a lot more things that can be configured and implemented to improve overall usability.

There is something called Zentyal which is a Windows SMB-like server, based on Ubuntu that can do all this things with a nice web-GUI.

It is simply too much to explain everything in a post, but this will give you some info tho get started. If you want some more explanation about a specific part, just make a post.

Share:
7,137

Related videos on Youtube

DJ_Beardsquirt
Author by

DJ_Beardsquirt

Ubuntu user for 8 years. Still learning.

Updated on September 18, 2022

Comments

  • DJ_Beardsquirt
    DJ_Beardsquirt over 1 year

    I work in a small office with 6 PCs and a server. I'm looking at installing Ubuntu on all of the computers, but I'd like users to be able to log in to any one of the computers and be able to access their files.

    Is it possible to store each users home directories on the server and set up each PC to check their credentials on there too?

    I'm thinking that by setting up the network like this I can keep everything tidily on one system and manage everything from there. Is this a sane approach or will it eventually just lead to more headaches/complexity and cause performance issues over LAN?

  • DJ_Beardsquirt
    DJ_Beardsquirt over 9 years
    You mention that there are software solutions designed for this sort of set up, can you name a few, please? My Googlefu is failing me. Also, is creating a single home directory the recommended approach, or is it equally viable to still have individual home directories for each user?
  • Panther
    Panther over 9 years
    You need to elaborate your answer quite a bit. See help.ubuntu.com/community/LDAPClientAuthentication for details. There is really no way to directly share those files using nfs
  • Barafu Albino
    Barafu Albino over 9 years
    I did share them between. See no problem as long as I avoided things like encrypted folder or something. And yes, LDAP or anything is better way to go.
  • Ángel
    Ángel over 9 years
    Moving /etc/passwd to a nfs share is a perfect way to ensure that when the client fails to mount the share you won't be able to log in locally to fix it. You should use another system for There are other considerations to take into account, such as a malicious client being able to read the password hashes (assuming those files are ro and users can only change their passwords at the server, write access allows for greater compromise), although nis also has this problem.
  • Barafu Albino
    Barafu Albino over 9 years
    You would be able to boot in recovery mode. Or you may share files not by NFS but by rsync. I've told that this is a basic solution.
  • dashohoxha
    dashohoxha over 9 years
    Me too would suggest Zentyal. Those simple ad-hoc solutions lead to headaches and failure even for experts.
  • CodingInTheUK
    CodingInTheUK almost 4 years
    rsync sounds like a nice approach, a script running at regular intervals to check for changed.. would checksum be a viable check to then only trigger rsync if things have changed?