I currently have a server which has Kerberos/SSSD/Samba to authenticate to Windows 2012 AD.
/etc/pam.d/system-auth oddjob_mkhomedir is set as below:
session optional pam_oddjob_mkhomedir.so umask=0077 skel=/etc/skel
This was set by running
authconfig --enablesssdauth --enablesssd --enablemkhomedir --update.
However when logging in via SSH with an AD account the home directory isn't created and the user simply ends up in root with
/bin/sh rather than
Nothing in the error logs suggests either sssd isn't running as expected or the PAM module isn't being called.
Configs copied below:
Port 22 ListenAddress x.x.x.x Protocol 2 SyslogFacility AUTHPRIV PermitRootLogin yes PasswordAuthentication yes ChallengeResponseAuthentication no KerberosAuthentication yes GSSAPIAuthentication yes GSSAPICleanupCredentials yes UsePAM yes AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE AcceptEnv XMODIFIERS X11Forwarding yes Subsystem sftp /usr/libexec/openssh/sftp-server
[sssd] config_file_version = 2 debug_level = 7 domains = mydomain.co.uk services = nss, pam override_homedir = /home/%d/%u default_shell = /bin/bash [nss] [pam] [domain/mydomain.co.uk] id_provider = ad access_provider = ad cache_credentials = true debug_level = 7