感谢您阅读
docker exec ldap-service ldapsearch -v -x -H ldap://localhost:389 -b dc=everteam,dc=us -D "cn=admin,dc=everteam,dc=us" -w everteam cn=estebanf
...返回我正在寻找的结果:
ldap_initialize( ldap://localhost:389/??base )
filter: cn=estebanf
requesting: All userApplication attributes
# extended LDIF
#
# LDAPv3
# base <dc=everteam,dc=us> with scope subtree
# filter: cn=estebanf
# requesting: ALL
#
# estebanf, People, everteam.us
dn: cn=estebanf,ou=People,dc=everteam,dc=us
cn: estebanf
displayName: Esteban J Felipe M
mail: e.felipe@everteam.com
givenName: Esteban Felipe
sn: Esteban Felipe
userPassword:: e01ENX00UXJjT1VtNldhdStWdUJYOGcrSVBnPT0=
objectClass: inetOrgPerson
objectClass: top
objectClass: organizationalPerson
objectClass: person
ou: People
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
但是这个命令:
docker exec ldap-service ldapsearch -v -x -H ldap://localhost:389 -b dc=everteam,dc=us -D "cn=admin,dc=everteam,dc=us" -w everteam cn=estebanf,ou=People,dc=everteam,dc=us
..没有。不同之处在于我正在使用完整的dn
# extended LDIF
#
# LDAPv3
# base <dc=everteam,dc=us> with scope subtree
# filter: cn=estebanf,ou=People,dc=everteam,dc=us
# requesting: ALL
#
# search result
search: 2
result: 0 Success
# numResponses: 1
ldap_initialize( ldap://localhost:389/??base )
filter: cn=estebanf,ou=People,dc=everteam,dc=us
requesting: All userApplication attributes
有关如何使用完整的dn进行搜索的任何建议吗?我正在尝试与openldap集成的软件将发出完整DN的搜索,我无法改变它。
谢谢!
答案 0 :(得分:1)
尝试类似:
ldapsearch -v -x -H ldap://localhost:389 -b cn=estebanf,ou=People,dc=everteam,dc=us -D "cn=admin,dc=everteam,dc=us" -w everteam --searchScope base "(objectclass=*)" '*'
在请求所有属性的单个用户条目中执行搜索。
-Jim