连接到 ldap 时出现绑定错误

mea*_*our 0 linux bind ldap selinux ldap-query

我编写了以下 ldap 命令来测试 ldap 连接

 ldapsearch -x -h ldap.com -b "uid=user1,ou=people,dc=domain,dc=com" 
Run Code Online (Sandbox Code Playgroud)

我得到以下输出

# extended LDIF
#
# LDAPv3
# base <uid=user1,ou=people,dc=domain,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# search result
search: 2
result: 1 Operations error
text: 000004DC: LdapErr: DSID-0C0907C2, comment: In order to perform this opera
 tion a successful bind must be completed on the connection., data 0, v2580

# numResponses: 1
Run Code Online (Sandbox Code Playgroud)

请建议如何解决绑定错误

jwi*_*eke 5

该错误意味着您需要绑定到服务器才能执行搜索。举个例子:

ldapsearch -D "cn=directory manager" -w secret -p 389 -h server.example.com -b "dc=example,dc=com" -s sub "(objectclass=*)"
Run Code Online (Sandbox Code Playgroud)

ldapsearch的手册页