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

我很确定这不是最好的答案,但它仍然有效,现在我可以登录了。

相关内容