Ubuntu 11.10 and 12.04
I am writing a chef recipe to setup LDAP clients and make our users' NFS home directories available to them upon login. After my chef recipe is run, LDAP works perfectly however I am getting the error:
Could not chdir to home directory /udd/testuser: No such file or directory
The directory does not exist.
The strange thing is, when I restart the system, the automount of the directory works fine. Unfortunately because this is being designed for our private cloud deployment simply restarting the system is not an option, It has to work without a reboot.
I am using /etc/pam.d/common-session to create the home directory so automount has a location to mount the directory to.
my /etc/pam.d/common-session:
session sufficient pam_ldap.so
session required pam_unix.so
session optional pam_mkhomedir.so umask=0022 skel=/etc/skel
Have also tried with
session required pam_mkhomedir.so umask=0022 skel=/etc/skel
Any help would be greatly appreciated.
[link][7 comments]