After install the openldap (slapd) from Debian package repository (using the 
version 2.4.57+dfsg-3~bpo10+1, database created by the dpkg configuration 
script provide by apt), the admin user (cn=admin,dc=example,dc=com) in could 
not be found either when performing ldapsearch or viewing the structure of the 
organisation in phpldapadmin / Apache directory studio.


result of ldapsearch:
------------
root@ldap:~# ldapsearch -x -b "dc=example,dc=com"
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# example.com
dn: dc=example,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: example.com
dc: exmaple

# search result
search: 2
result: 0 Success
------------

However, using ldapwhoami (ldapwhoami -vvv -h ldap.example.com -D 
cn=admin,dc=example,dc=com -x -w password) can return a successful result.

result of ldapwhoami:
------------
ldap_initialize( ldap://localhost )
dn:cn=admin,dc=example,dc=com
Result: Success (0)
------------

A similar issue can be found here: 
https://github.com/osixia/docker-openldap/issues/555 on Github. According to 
the user in Github, this issue is first occurred in openldap 2.4.57 
(https://github.com/osixia/docker-openldap/releases/tag/v1.5.0
I'm not sure whether it is a feature or a bug of slapd. Thanks in advance!

Reply via email to