Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from stackoverflow.com Dec 12 '12 at 12:12

This question came from our site for professional and enthusiast programmers.

I am trying to solve the similar problem. createhomedir utility can do the job, but I can not locate pam_exec.so on Mac OS to call the thing. The dirty hack is to write /etc/sshrc (which is similar to /etc/profile, but called at ssh session start time) calling small wrapper with suid bit on, which in turn calls "createhomedir -c -u username". Skip the steps if home directory exists or if terminal is absent.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .