I can join machines to a realm with Ubuntu no problem. So using the exact same steps for CentOS 7.7, I am able to join the domain and id users... but I can't ssh in!
Steps I use only differ with slight difference in package requirements. Here are my CentOS AD join steps:
sudo dnf install net-tools samba sssd krb5-workstation krb5-server sssd-krb5 sssd-ad nfs-utils oddjob-mkhomedir /etc/hostname #contains: hostname /etc/hosts #contains: 127.0.0.1 hostname -set SELINUX to permissive in /etc/selinux/config Edit /etc/krb5.conf sudo kinit domain_administrator Edit /etc/samba/smb.conf systemctl stop sssd Edit /etc/sssd/sssd.conf sudo chmod 600 /etc/sssd/sssd.conf sudo net ads join -Udomain_administrator Add this line to /etc/pam.d/common-session session required pam_mkhomedir.so skel=/etc/skel/ umask=0022 systemctl start sssd systemctl enable sssd id moreilly -Succesfully outputs id info ssh banana@hostname Permission denied, please try again.
But when I try to su or ssh user@centosbox, it says "Permission denied, please try again."
If I change and enable these lines in /etc/ssh/sshd_config, then I can ssh in BUT no home directory is created:
# Kerberos options #default is no KerberosAuthentication yes KerberosOrLocalPasswd yes KerberosTicketCleanup yes #default no KerberosGetAFSToken yes KerberosUseKuserok yes # GSSAPI options GSSAPIAuthentication yes # DEFAULT IS NO GSSAPICleanupCredentials yes
Home directory is created automatically on Ubuntu but not on CentOS. Why would I need to go enable these Kerberos and GSSAPI directives in sshd_config for CentOS and not on Ubuntu?
In the end:
- I dont know why I would need to edit sshd_config on CentOS and not Ubuntu.
- If I do have to enable these sshd_config directives, then I don't what more to do to get home directories being enabled