wheelybird/ldap-user-manager

Unable to login with admin account during setup

verashanky opened this issue · 2 comments

I am trying to use ldap-user-manager along with bitnami openldap server with the following config. Containers are up and running successfully, but when I load the setup URL and login with admin password, I get the following error in UI:
Problem: Failed to bind as cn=admin,dc=company,dc=network

Wondering what I'm missing here?

Docker-compose.yml
`
version: '3'

networks:
openldap:
name: openldap

services:
openldap:
image: bitnami/openldap:latest
restart: unless-stopped
ports:
- '1389:1389'
- '1636:1636'
environment:
- LDAP_ORGANISATION=company
- LDAP_DOMAIN=company.network
- LDAP_ROOT=dc=company,dc=network
- LDAP_ADMIN_USERNAME=admin
- LDAP_ADMIN_PASSWORD=password
networks:
- openldap
volumes:
- 'openldap_data:/bitnami/openldap'

openldap-ui:
image: wheelybird/ldap-user-manager:latest
restart: unless-stopped
ports:
- 8082:80
environment:
- SERVER_HOSTNAME=localhost:8082
- LDAP_URI=ldap://openldap
- LDAP_BASE_DN=dc=company,dc=network
- LDAP_ADMINS_GROUP=admins
- LDAP_ADMIN_BIND_DN=cn=admin,dc=company,dc=network
- LDAP_ADMIN_BIND_PWD=password
- LDAP_IGNORE_CERT_ERRORS=true
- NO_HTTPS=true
networks:
- openldap
depends_on:
- openldap

volumes:
openldap_data:
driver: local
`

Log file:
63d33c25.2c682d7e 0x7fa6dadfe700 conn=1574 fd=14 TLS established tls_ssf=256 ssf=256 tls_proto=TLSv1.3 tls_cipher=TLS_AES_256_GCM_SHA384 63d33c25.2c69c536 0x7fa6f0e39700 conn=1574 op=1 BIND dn="cn=admin,dc=company,dc=network" method=128 63d33c25.2c6b3dee 0x7fa6f0e39700 conn=1574 op=1 RESULT tag=97 err=49 qtime=0.000014 etime=0.000129 text= 63d33c25.2c6e0f3c 0x7fa6da5fd700 conn=1574 op=2 UNBIND 63d33c25.2c6f638f 0x7fa6da5fd700 conn=1574 fd=14 closed

Hi. Are you sure that's the actual Docker compose config you're using? I get an error for the networks section - name: not expected.
Fixing that I can get the containers to run, but ldap-user-manager can't connect to the openldap container. This is because the bitnami container is configured to start slapd on port 1389 rather than 389. So if I change LDAP_URI to ldap://openldap:1389 it works.
This doesn't match with the logs you've pasted though - if you were having this issue you'd see Failed to bind to ldap://openldap as cn=admin,dc=company,dc=network: Can't contact LDAP server in the logs, and wouldn't see any slapd logs.
In fact err=49 suggests a wrong bind DN or password, which suggests that ldap-user-manager can connect but the password is wrong. Perhaps you set up the LDAP container initially with a different password and didn't subsequently update it?