I'm trying to set up remote home folders for Ubuntu 22.04 workstations. These workstations are joined to an AD domain using sssd and krb5, and users sign in using their AD credentials. I'm also using pam_mount to mount some CIFS/SMB shares using the krb5 credentials. That's all good and working.
I'd now like to host users home folders remotely, so that they can log in on different workstations and still have their settings and user data available. For that I'd like to auto-mount the /home/username folder to a CIFS/SMB share //server/homes/username on login using the users krb5 ticket.
I've tried setting this up with either pam_mount or autofs, but have not managed to get this working reliably. If someone could point me into the right direction there that would be much appreciated.
Edit 05 Feb 2023:
The thing that almost works is:
- mount folder /mnt/home to //server/homes with autofs
- add the following to sssd.conf: override_homedir = /mnt/home/%u
This is slightly different to my initial attempt to mount /home/username... and works sometimes. But there is some sort of race condition, where at the time Ubuntu checks for the homedir the mount may or may not exist yet. Result is that things either work, or you get an error msg saying "could not chdir to home directory... no such file or directory"