用户需要多次尝试通过 SSH 连接到多台用于sssd
身份验证的 64 位 Ubuntu 机器。
在允许用户登录之前,以下情况将连续发生 0 至 6 次:
ssh [email protected]
[email protected]'s password:
Connection closed by 10.13.63.101
Connection closed by 10.13.63.101
错误发生需要几秒钟。
/var/log/auth.log
下面是一个显示失败然后又显示成功的示例:
sshd[7098]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=x.x.x.x user=User
sshd[7098]: pam_sss(sshd:auth): authentication success; logname= uid=0 euid=0 tty=ssh ruser= rhost=x.x.x.x user=User
sshd[7098]: pam_sss(sshd:account): Access denied for user User: 4 (System error)
sshd[7098]: Failed password for bob from x.x.x.x port 54817 ssh2
sshd[7098]: fatal: Access denied for user bob by PAM account configuration [preauth]
sshd[7106]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=x.x.x.x user=bob
sshd[7106]: pam_sss(sshd:auth): authentication success; logname= uid=0 euid=0 tty=ssh ruser= rhost=x.x.x.x user=bob
sshd[7106]: Accepted password for bob from x.x.x.x port 54826 ssh2
sshd[7106]: pam_unix(sshd:session): session opened for user User by (uid=0)
systemd-logind[529]: Removed session 69.
systemd-logind[529]: New session 70 of user bob.
看来最重要的行是上面输出中的第三行:
sshd[7098]: pam_sss(sshd:account): Access denied for user User: 4 (System error)
根据sssd
官方维基百科(https://fedorahosted.org/sssd/wiki/Troubleshooting):
System Error is an "Unhandled Exception" during authentication. It can either be an SSSD bug or a fatal error during authentication.
该sssd
包是最新的:
$ sudo apt-get install sssd
sssd is already the newest version.
到目前为止,这仅影响我们系统中的一小部分样本(约几十个中的 4 个)。
更新:
看起来sssd
日志要么是空的,要么是几个月前的。
bob@system:/var/log/sssd$ ls -l
total 16
-rw------- 1 root root 0 Jan 26 2015 ldap_child.log
-rw------- 1 root root 0 Jan 26 2015 sssd_LDAP.log
-rw------- 1 root root 0 Aug 5 06:49 sssd.log
-rw------- 1 root root 268 Aug 4 16:24 sssd.log.1
-rw------- 1 root root 158 Jun 15 11:47 sssd.log.2.gz
-rw------- 1 root root 139 May 25 13:17 sssd.log.3.gz
-rw------- 1 root root 139 May 11 11:08 sssd.log.4.gz
-rw------- 1 root root 0 Jan 26 2015 sssd_nss.log
-rw------- 1 root root 0 Jan 26 2015 sssd_pam.log