osixia / docker-openldap

OpenLDAP container image 🐳🌴
MIT License
4.06k stars 978 forks source link

client can't connect ldap in docker #616

Open junfenggood opened 2 years ago

junfenggood commented 2 years ago

I deploy ldap with docker,use centos7.7, Ican edit it with PHPldap admin or ldapadmin,but when I add client ,I con't change user .also i use ldap search cmd to search user return error 32, no such object. but when i use php ldap admin,i can see the use. verison is:1.3 I also chenge os to centos8, got same error

KokutoSan commented 2 years ago

Hello, Did you run your container with a command like the one bellow? docker run -p 389:389 -p 636:636 --name my-openldap-container --detach osixia/openldap:1.5.0 because both port 389 (ldap) and 636 (ldaps) must be exposed if you want an external client to be able to connect to your OpenLDAP instance.

alciviades commented 2 years ago

Hello, I have the same issue, the ports are exposed,

alciviades commented 2 years ago
docker run \
-p 389:389 -p 636:636 \
--name ldap-service \
--hostname ldap-service \
--env LDAP_ORGANISATION="spi" \
--env LDAP_DOMAIN="spi.com" \
--env LDAP_ADMIN_PASSWORD="admin" \
--env LDAP_BASE_DN="dc=spi,dc=com" \
--volume /data/slapd/database:/var/lib/ldap \
--volume /data/slapd/config:/etc/ldap/slapd.d \
--detach osixia/openldap:1.5.0
joaoepj commented 2 years ago

Here it works!