ldap访问权限不足

Insufficient access rights in ldap

尝试使用现有的 user_dn 和 userPassword 绑定到 LDAP 服务器时,我获得的访问权限不足,即使 userPassword 不正确。如果我输入不正确的 user_dn,我会得到无效的凭据。

为什么我会收到这些错误?这些错误的含义是什么?我应该如何修复它们?

这是我用来绑定的代码

require 'net/ldap'
con = Net::LDAP.new
con.host = 'localhost'
con.port = 389
con.auth 'cn=user,dc=example,dc=com', 'user'

if con.bind
  # authentication succeeded
  puts 'success'
  puts con.get_operation_result
else
  # authentication failed
  puts 'fail'
  puts con.get_operation_result
 # p con.get_operation_result
end

提前致谢

访问权限不足意味着 LDAP 服务器已配置为限制谁可以访问什么。这不是绑定(身份验证)错误。您可能需要与 LDAP 服务器管理员联系以了解详细信息。