I have LDAP server on Ubuntu 12.04 and Mac OS X 10.7.5 client configured via Directory Service. The NFSHomeDirectory property mapped to #/Users/$uid$. LDAP users can login to Mac via login screen or via SSH. When user login from login screen the system creates proper home directory (if it wasn't made before) and everything works fine.
Problem: When user login via SSH the home directory is not creating.
I've tried to enable pam_mkhomedir.so module at /etc/pam.d/sshd. But when I do it ssh stop working. The skeleton directory I tried: /System/Library/User\ Template/English.lproj. There are rumors that mkhomedir pam modile is not built in into OS X, but custom build of pam is not an option for me.