Ldap – Unable to create Home Directory for LDAP Login

home-directoryldap

I have linked my server with LDAP for ssh login. I get the Following error while logging in using ssh.

Could not chdir to home directory /home/ldap/sharukhk: No such file or directory

shahrukh@shahrukh:~/deploy$ ssh sharukhk@10.200.99.226
sharukhk@10.200.99.226's password: 
Last login: Tue Sep 29 14:28:10 2015 from 10.200.100.245
Could not chdir to home directory /home/ldap/sharukhk: No such file or directory
-bash-4.1$ 

I have tried the following method to auto create home directory while login but it does not work

session required pam_mkhomedir.so skel=/etc/skel/ umask=0077

Best Answer