Home Forums OS X Server and Client Discussion Questions and Answers Could not chdir to home directory

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #367967
    ebradford
    Participant

    I have just installed our new 10.4.8 server. It is currently an Open Directory Master and Windows primary domain controller. I am getting the following message when trying to authenticate as an Open Directory user from a Red Hat ES 4 box.

    Could not chdir to home directory /Network/Servers/mydomain.com/Volumes/hardrive/userdirectory/username: No such file or directory

    The file and the directory both exist as it mounts fine on an OSX client machine.

    I have also tried nfs to no avial.

    I am able to mount -t smbfs and mount the user directory.

    What do I need to do to make Red Hat mount any users home directory that is stored on the OS X server after authenticating to the open directory master?

    #368046
    bastronaut
    Participant

    How did you create a shared volume using the “Volumes” directory? “Volumes” is hidden.

    Normally (in my admittedly limited experience), the share path would look like:

    /Network/Servers///

    and the <shared_volume_name> would point to a Finder-visible folder on a locally attached drive on the server <server_name>.

    Mac OS X automatically mounts home directory volumes when it is connected (not necessarily bound) to Open Directory because it looks for auto mount points, and it succeeds because the /Network/Servers/ directory exists. I don’t think either of those things would be the case for a Linux box, unless it was customized.

    #368563
    Tarny
    Participant

    Here is another issue with the same error message. There is an Active Directory with a Mac OS X Server correctly bound. When connecting via ssh to (server.pretend.com) the Mac OS X member server (i.e. the member server role is “Connected To”) the “[b]Could not chdir to home directory[/b] error message occurs.”

    [code]
    ssh [email protected].2.7
    Password:
    Welcome to Darwin!
    Could not chdir to home directory /Network/Servers/server.pretend.com/Users/user: No such file or directory
    server:/ user$ printenv
    TERM=xterm-color
    SHELL=/bin/sh
    SSH_CLIENT=192.168.2.9 57217 22
    SSH_TTY=/dev/ttyp2
    USER=user
    MAIL=/var/mail/user
    PATH=/bin:/sbin:/usr/bin:/usr/sbin
    PWD=/
    SHLVL=1
    HOME=/Network/Servers/server.pretend.com/Users/user
    LOGNAME=user
    SSH_CONNECTION=192.168.2.9 57217 192.168.2.7 22
    _=/usr/bin/printenv
    [/code]

    I understand that the HOME environment variable is being set from the NFSHomeDirectory attribute in Open Directory, but I don’t understand how we can modify this so that for ssh connection is it the shorter local path and yet for login window connections with network home folders it is the longer network path.

    Should I look at scripting something in say ~/.profile or ~/.bashrc ? But, if I do that, I’ll have to determine local versus remote sessions so that I can use the correct path. It would be annoying to startup terminal.app and have it give me that chdir error message.

    Looking forward, I’m thinking that other services on the member server might need modifications like this so that home directorys use local paths rather than network paths. But, at the same time we need to maintain that darn network home directory path for the Login Window connections.

    [i]T.[/i]

    #368601
    ebradford
    Participant

    Success, thanks, MacTroll.

    We followed steps 1,2, & 3, but still had a problem with the home
    directory not being created on the RHEL4 box. To fix that, we added the
    line below to /etc/pam.d/system-auth as the second last line, above the
    pam_ldap.so line
    session required /lib/security/$ISA/pam_mkhomedir.so
    skel=/etc/skel/ umask=0077

    Now, it is working like a charm.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Comments are closed