1

I have LDAP auth configuration and I want to prevent user to have access to a computer without home directory on it. Console login and kdm login work fine - user access is denied, but sshd permits to login with home directory /.

How to avoid this problem?

3
  • 1
    This same question has been asked here: unix.stackexchange.com/questions/68745/… Jul 14 '14 at 5:18
  • Thank you. It is very usefull article. It seems that a module "pam_homecheck" helps in this problem, but it is absent in Ubuntu.
    – Arcady
    Jul 15 '14 at 0:34
  • A direct way to do this - add into /etc/bash.bashrc: [[ ! -x $HOME ]] && { echo "Error: No home directory. Bye."; exit 1; }
    – Arcady
    Jul 15 '14 at 0:56
0

You are able to specify which users that have access the server by configuring the

/etc/ssh/sshd_config:
     AllowUsers admin bob

You can list all users by hand or extract them by creating a start up script.

Your Answer

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

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