2

I have a host running Debian 8. I set LDAP authentication, but the home directory is not created. I added in common-session:

session optional        pam_systemd.so skel=/etc/skel/ umask=0077

It didn't help, so I tried adding in common-account:

session    required   pam_mkhomedir.so skel=/etc/skel/ umask=0022

This also didn't work. I still get the error:

ssh user.name@192.168.250.30
Last login: Wed Oct 12 01:54:59 2016 from 192.168.70.96
Could not chdir to home directory /home/user.name: No such file or directory

I've looked at the manual, but haven't found the answer:

How can I prevent this error message?

SOLVED

In /etc/ssh/ssh_config edit UsePAM yes

  • In one environment I work in, there are no home directories, and you get this error message any time you log in to any server. It doesn't harm anything; it's just noise. You can ignore it. (But I would be interested in the config options to avoid this noise....) – Wildcard Oct 18 '16 at 4:33
  • @Nikita check the UsePAM option in /etc/ssh/sshd_conf on that server, is it yes, or no? – Serge Oct 18 '16 at 4:54
  • @Wildcard I believe that without (auto)creating (temporary)homes at remote site it is not possible to get rid of that message – Serge Oct 18 '16 at 5:00
  • @Serge, man, i idiot. I writing "UsePAM no" in playbook ansible and forgot it. THANKS! I write yes and it work! – Nikita Oct 18 '16 at 5:05
  • @Serge, care to make that an answer? :) – Wildcard Oct 18 '16 at 5:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.