I’m trying to convert an autofs setup to systemd for user home dirs through cifs. In essence the problem is to provide the mount command with uid, gid, cruid and UNC per user account when the mount is triggered. The system is integrated with Active Directory for user auth and I use kerberos ticket to authenticate the cifs mount.
In autofs I have a map like this
/adhomes program /etc/auto.adhome --timeout 300
where the /etc/auto.adhome script fetch the neccessary user info from AD with getent and print the following beauty to stdout for autofs to consume
The $VARS are computed by the scripts so it returns
We have 20000 accounts in our AD so all mappings have to be done on demand. The autofs setup seems to work quite well, but systemd seems to be the way of the future so I’m trying to do the modern approach. Any pointers would be greatly appreciated.
This is on CentOS 8.1.