On a CentOS 7 machine, users can use their LDAP credentials to connect to my servers. The first time they do this, the pam_mkhomedir is doing its job well. The user's folder /home/jdoe is well created with the right permission.
The issue is that when Joe connects to my server, using SSH or directly on the server monitor (just to say that it's not only a pam.d/ssh issue), its shell doesn't start in his home directory. Instead, it starts on "/home" or "/" directory.
The $HOME is the right one, if Joe does a "cd", the shell goes to "/home/jdoe" and the HomeDirectory in LDAP is the right one.
/etc/pam.d/sshd content:
#%PAM-1.0
auth required pam_sepermit.so
auth substack password-auth
auth include postlogin
# Used with polkit to reauthorize users in remote sessions
auth optional pam_reauthorize.so prepare
account required pam_nologin.so
account include password-auth
password include password-auth
# pam_selinux.so close should be the first session rule
session required pam_selinux.so close
session required pam_loginuid.so
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session required pam_selinux.so open env_params
session required pam_mkhomedir.so
session required pam_namespace.so
session optional pam_keyinit.so force revoke
session include password-auth
session include postlogin
# Used with polkit to reauthorize users in remote sessions
session optional pam_reauthorize.so prepare
Anyone know how to help me to find the solution ?
0 Answers