openldap 與 macOS 用戶端

openldap 與 macOS 用戶端

我嘗試將 Mac 用戶端設定為使用 LDAP 連線到其會話(使用 openLDAP)。

我已經使用 PosixGroups 建立了 PosixAccounts,並在 ubuntu 系統上進行了嘗試:我可以使用我的使用者登入。

但在 macOS 上(嘗試使用 Mojave 和 Sierra)我根本無法登入。

我在目錄實用程式中看到我的用戶,我甚至可以在使用id命令時看到他們:

bash-3.2$ id -p hlarget
uid hlarget
groups  sysadmin everyone netaccounts com.apple.sharepoint.group.1

我甚至可以透過命令使用用戶ldapsearch -H ldap://example.com -D "cn=hlarget,dc=example,dc=com" -W

我有一個“49”錯誤代碼(就在 5000 錯誤之後)

failed CRAM-MD5 authentication for authzid - 'dn:cn=hlarget+o=example+ou=users,ou=users,dc=example,dc=com' authcid - 'hlarget' error 49

我無法使用目錄編輯器編輯我的目錄cn=admin,dc=example,dc=com(錯誤代碼 2100)。

我很確定問題出在加密上,但我嘗試了不同的密碼加密,但沒有任何改變,而且我仍然可以在 Linux 配置上登入。

我怎麼能找出問題所在以及如何解決它?

答案1

我使用這個腳本解決了我的問題

for m in CRAM-MD5 DIGEST-MD5 LOGIN NTLM PLAIN; do
/usr/libexec/PlistBuddy -c "add ':module options:ldap:Denied SASL Methods:' string $m" /Library/Preferences/OpenDirectory/Configurations/LDAPv3/ldap.foo.fr.plist
done

我很確定這不是最好的答案,但它仍然有效,現在我可以登入。

相關內容