【问题标题】:Insufficient access rights in ldapldap 访问权限不足
【发布时间】:2018-06-03 00:56:19
【问题描述】:

尝试使用现有的 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

提前致谢

【问题讨论】:

    标签: ruby ldap openldap ldap-query


    【解决方案1】:

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

    【讨论】:

    • 我在我的 slapd.conf 文件中提供了访问控制,但我获得的访问权限不足。我的访问控制是:`access to * by * read`
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-10-16
    • 2019-11-15
    • 1970-01-01
    • 1970-01-01
    • 2015-01-09
    • 2019-02-27
    • 1970-01-01
    相关资源
    最近更新 更多