dn: dc=example,dc=org
objectClass: top
objectClass: dcObject
objectClass: organization
o: OpenLdap
dc: example
search result
search: 2
result: 0 Success
numResponses: 2
numEntries: 1
but this doesn't when executed directly from the host :
ldapsearch -x -H ldap://localhost -b dc=example,dc=org -D "cn=admin,dc=example,dc=org" -w admin
Result :
ldap_bind: Invalid credentials (49)
Hi,
I'm trying to ldapsearch from host to a container but it's not working. I saw 2 issues like mine but none of the solutions worked for me.
I start with :
docker run --env LDAP_ORGANISATION="OpenLdap" --env LDAP_DOMAIN="example.org" --env LDAP_ADMIN_PASSWORD="admin" -p 389:389 -p 636:636 --name openldap --detach osixia/openldap:1.5.0
Then this works :
docker exec openldap ldapsearch -x -H ldap://localhost -b dc=example,dc=org -D "cn=admin,dc=example,dc=org" -w admin
but this doesn't when executed directly from the host :
ldapsearch -x -H ldap://localhost -b dc=example,dc=org -D "cn=admin,dc=example,dc=org" -w admin
Result :ldap_bind: Invalid credentials (49)
thank you very much for your help