I'm trying to get pam_mkhomedir.so
to create an LDAP user's local home directory upon initial login. I'm on Ubuntu 20.04 LTS.
Currently, users are added to my server via LDAP (Active Directory backend). This has been configured with nslcd + nscd. I followed this guide here to get everything configured: https://www.markturner.net/2019/09/27/ad-ldap-authentication-on-linux-hosts/
Unfortunately, I can't seem to get the user's home directories to be generated. Stranger yet, when I dig into debugging, it appears the user's home directory is straight up blank.
Here is an example when user "jgoetz" tries to connect via SSH. The user can login, groups are working fine, but the home directory can't be created:
Oct 15 21:56:10 LDAP-Test6 sshd[3425]: Accepted password for jgoetz from 10.100.98.23 port 52602 ssh2
Oct 15 21:56:10 LDAP-Test6 sshd[3425]: pam_unix(sshd:session): session opened for user jgoetz by (uid=0)
Oct 15 21:56:10 LDAP-Test6 systemd-logind[689]: New session 16 of user jgoetz.
Oct 15 21:56:10 LDAP-Test6 mkhomedir_helper: PAM unable to create directory : No such file or directory
As seen on the last line, it appears mkhomedir_helper isn't even attempting to create a directory in /home, with the resulting error.
Can anyone point me in the right direction?
Thank you for your time!