Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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've configured an Ubuntu server so that it uses an LDAP server for authentication of SSH logins. I've also configured it so that home directories are created automatically when the user logs on.

What doesn't seem to be working though is the lookup of that user's home directory from another user. For example, if I want apache2 to be able to make the user's home directory available, it doesn't work, neither does "cd ~user".

It definitely works for the user when they SSH in - "cd ~" puts them in the right directory.

Am I missing something? Overlooking something in the configuration?



share|improve this question
The configuration of /etc/nsswitch.conf, /etc/ldap.conf and perhaps /etc/nslcd.conf would help. – 84104 Feb 25 '13 at 17:08
up vote 1 down vote accepted

I'm not sure why cd ~user wasn't working but it is now after shutting down the server and starting it up again (it is an EC2 instance so I had stopped it while I didn't need it), suggesting I should have restarted a process or something like that.

As to why apache2 wasn't supporting ~user, I hadn't "sudo a2enmod userdir". Once that was done, it all worked.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.