So, on a Yosemite system, I enabled Remote Login (ssh) and added a specific user. When I ssh as this user, my home directory defaults to /var/empty. Was I supposed to do anything else to enable a correct Home directory? (Note that the system has an Active Directory network account server.)

  • 1
    How / where did you add the user? Commented Apr 26, 2016 at 12:24
  • Via System Preferences > Sharing. When clicking on Remote Login, I added the user via the + button, then selected the user out of the list when clicking on "Network Users".
    – alphadogg
    Commented Apr 26, 2016 at 12:26

1 Answer 1


So not sure how you created the user but if you are expecting a locally cached home directory, and this is not a network account, you will want to user commands like the following to create the user account:

Credit for Script: http://wiki.freegeek.org/index.php/Mac_OSX_adduser_script

dscl . -create /Users/$USERNAME
dscl . -create /Users/$USERNAME UserShell /bin/bash
dscl . -create /Users/$USERNAME RealName "$FULLNAME"
dscl . -create /Users/$USERNAME UniqueID "$USERID"
dscl . -create /Users/$USERNAME PrimaryGroupID 20
dscl . -create /Users/$USERNAME NFSHomeDirectory /Users/$USERNAME
dscl . -passwd /Users/$USERNAME $PASSWORD

If you are looking to have the user directory provided by ActiveDirectory then ensure you have the following checked in your Active directory config and that all your server side AD settings are correct for this:

'User UNC Path from Active Directory to derive network home location'

You must log in to answer this question.

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