The role ufrmath.computer_labs.setup_nfs_ldap
is used to authenticate users with an LDAP server and serve home directories provided by an NFS server.
The following packages need to be installed:
sudo apt install ldap-utils sssd-ldap nfs-common
NFS mount is done automatically by using systemd mount:
[Unit]
Description=Mount Home
[Mount]
What={{ nfs_server }}:{{ nfs_home_path }}
Where={{ nfs_home_path }}
Type=nfs
[Install]
WantedBy=multi-user.target
and systemd.automount:
[Unit]
Description=Automount Home
[Automount]
Where={{ nfs_home_path }}
[Install]
WantedBy=multi-user.target
That way the NFS connection is established only when required.
Authentication is doing by SSSD with:
[sssd]
config_file_version = 2
domains = {{ domain }}
[domain/{{ domain }}]
id_provider = ldap
auth_provider = ldap
ldap_tls_reqcert = never
ldap_uri = {{ ldap_uri }}
cache_credentials = True
ldap_search_base = {{ ldap_search_base }}
More details are available in the official Ubuntu documentation.