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。無論如何,(我將其註釋掉)現在可以正常工作了!

相關內容