Ldap SSH 登录不起作用 - 相同的配置在 20 多个其他服务器上工作 - Ubuntu

Ldap SSH 登录不起作用 - 相同的配置在 20 多个其他服务器上工作 - Ubuntu

因此,我已在工作中的每台服务器上成功设置了 LDAP 登录(除了一台)。当然必须有那个!我想关闭我的 jira 票证,但我不知道问题是什么。系统是Ubuntu 10 x32

这是 auth.log 的输出

Oct 29 10:56:33 localhost sshd[2560]: Invalid user LDAPUSERNAME from 10.1.11.224
Oct 29 10:56:33 localhost sshd[2560]: Failed none for invalid user LDAPUSERNAME from 10.1.11.224 port 51830 ssh2
Oct 29 10:56:36 localhost sshd[2560]: pam_unix(sshd:auth): check pass; user unknown
Oct 29 10:56:36 localhost sshd[2560]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.1.11.224
Oct 29 10:56:36 localhost sshd[2560]: pam_ldap: error trying to bind as user "uid=LDAPUSERNAME,ou=People,dc=DOMAIN,dc=com" (Invalid credentials)
Oct 29 10:56:38 localhost sshd[2560]: Failed password for invalid user LDAPUSERNAME from 10.1.11.224 port 51830 ssh2

更新:这是在另一台服务器上成功登录以及 auth.log 的输出

Oct 29 11:23:56 daily sshd[20625]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=10.1.11.224  user=LDAPUSERNAME
Oct 29 11:23:56 daily sshd[20625]: Accepted password for LDAPUSERNAME from 10.1.11.224 port 52211 ssh2
Oct 29 11:23:56 daily sshd[20625]: pam_unix(sshd:session): session opened for user LDAPUSERNAME by (uid=0)

答案1

由于某种原因,LDAP 服务器的身份验证失败(不是用户的身份验证):

10 月 29 日 10:56:36 localhost sshd[2560]: pam_ldap: 尝试绑定为用户“uid=LDAPUSERNAME,ou=People,dc=DOMAIN,dc=com”时出错(凭据无效)

如何向 LDAP 服务器进行身份验证,请尝试设置debug 9线路pam_ldap以获取更多信息。与在工作服务器上执行相同操作进行比较可能会带来更多想法。

手动运行也ldapsearch可能会出现配置中的一些错误。

答案2

由于某种原因,安装过程中未创建 /etc/nslcd.conf。我从另一台具有有效 LDAP 设置的 Ubuntu 10 服务器复制了它,但由于该行 >> 而无法启动

#nss_initgroups_ignoreusers ALLLOCAL

这很奇怪,因为它在另一台 Ubuntu 10 服务器上,我也使用相同的配置进行了设置,但那是 linux。无论如何,(我将其注释掉)现在可以正常工作了!

相关内容