ruby - ldap访问权限不足

标签 ruby ldap openldap ldap-query

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

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

这是我用来绑定(bind)的代码

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 服务器已配置为限制谁可以访问什么。这不是绑定(bind)(身份验证)错误。您可能需要咨询 LDAP 服务器管理员以了解详细信息。

关于ruby - ldap访问权限不足,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47906465/

相关文章:

ruby - Rspec——模拟另一个类中的方法

c++ - 为什么 Crypto++ 和 Ruby 生成的 SHA-1 哈希略有不同?

Ruby 成语铲成一个字符串或零? (例如铲子或指定/安全铲子)

linux - 安装后的 OpenLDAP 管理员密码

Ruby 重载 + 运算符

java - InetAddress 无法检索 FQDN,而 nslookup 可以

java - 有没有办法向 InitialLdapContext 提供 SocketFactory_instance_?

ssl - 初始安装启用 TLS 后的 OpenLDAP,如何启动?

ios - 如何将c程序转换为完全可移植的ios

apache - 带有 LDAP 身份验证的 SVN 无法正常工作