For those trying to non-interactively enable mkhomedir module, here's what I did:
sed -i '/mkhomedir/d' /var/lib/pam/seen pam-auth-update --package
After running pam-auth-update, mkhomedir was present in /etc/pam.d/common-session. Found this solution here https://ubuntuforums.org/showthread.php?t=2278852
For those trying to non-interactively enable mkhomedir module, here's what I did:
sed -i '/mkhomedir/d' /var/lib/pam/seen
pam-auth-update --package
After running pam-auth-update, mkhomedir was present in /etc/pam. d/common- session. Found this solution here https:/ /ubuntuforums. org/showthread. php?t=2278852