[GH-ISSUE #4] Only anonymous authentication enabled ? #1

Closed
opened 2026-02-27 16:47:36 +03:00 by kerem · 6 comments
Owner

Originally created by @k1n0b0n on GitHub (Aug 22, 2018).
Original GitHub issue: https://github.com/rroemhild/docker-test-openldap/issues/4

Hi, I'm trying to use you docker image to setup a quick ldap authentication !
I did successfully run a container and can access it's data when i login anonymously through phpLDAPadmin, though i cannot access it with my app because it requires a username and a password for the root DN.

Is there a way you could help me with that please ?
Thanks a lot for this repository and for you attention !

Originally created by @k1n0b0n on GitHub (Aug 22, 2018). Original GitHub issue: https://github.com/rroemhild/docker-test-openldap/issues/4 Hi, I'm trying to use you docker image to setup a quick ldap authentication ! I did successfully run a container and can access it's data when i login anonymously through phpLDAPadmin, though i cannot access it with my app because it requires a username and a password for the root DN. Is there a way you could help me with that please ? Thanks a lot for this repository and for you attention !
kerem closed this issue 2026-02-27 16:47:36 +03:00
Author
Owner

@rroemhild commented on GitHub (Aug 22, 2018):

Hi, I can't reproduce your problem. Can you post any logs from the container? I've just tried the login with ldap-tools:

$ ldapwhoami  -v -x -h localhost
ldap_initialize( ldap://localhost )
anonymous
Result: Success (0)
$ ldapwhoami -v -x -h localhost -D "cn=Hermes Conrad,ou=people,dc=planetexpress,dc=com" -w hermes
ldap_initialize( ldap://localhost )
dn:cn=Hermes Conrad,ou=people,dc=planetexpress,dc=com
Result: Success (0)
<!-- gh-comment-id:415176784 --> @rroemhild commented on GitHub (Aug 22, 2018): Hi, I can't reproduce your problem. Can you post any logs from the container? I've just tried the login with ldap-tools: ``` $ ldapwhoami -v -x -h localhost ldap_initialize( ldap://localhost ) anonymous Result: Success (0) ``` ``` $ ldapwhoami -v -x -h localhost -D "cn=Hermes Conrad,ou=people,dc=planetexpress,dc=com" -w hermes ldap_initialize( ldap://localhost ) dn:cn=Hermes Conrad,ou=people,dc=planetexpress,dc=com Result: Success (0) ```
Author
Owner

@k1n0b0n commented on GitHub (Aug 24, 2018):

Hello, I will try to provide you with an example of what I'm trying to do and logs too.
Thanks for you quick answer !

<!-- gh-comment-id:415692658 --> @k1n0b0n commented on GitHub (Aug 24, 2018): Hello, I will try to provide you with an example of what I'm trying to do and logs too. Thanks for you quick answer !
Author
Owner

@montetitan commented on GitHub (Jun 9, 2020):

docker run --env LDAP_ORGANISATION="people" --env LDAP_DOMAIN="planetexpress.com" --env LDAP_ADMIN_PASSWORD="admin" --privileged -p 389:389 -p 636:636 --name my-openldap-container --detach rroemhild/test-openldap

how do i make
ldapwhoami -v -x -h localhost -D "ou=people,dc=planetexpress,dc=com" -w hermes work? or any other user for that matter?

<!-- gh-comment-id:641156767 --> @montetitan commented on GitHub (Jun 9, 2020): docker run --env LDAP_ORGANISATION="people" --env LDAP_DOMAIN="planetexpress.com" --env LDAP_ADMIN_PASSWORD="admin" --privileged -p 389:389 -p 636:636 --name my-openldap-container --detach rroemhild/test-openldap how do i make ldapwhoami -v -x -h localhost -D "ou=people,dc=planetexpress,dc=com" -w hermes work? or any other user for that matter?
Author
Owner

@rroemhild commented on GitHub (Jun 9, 2020):

-w is the password for the user entry DN set with -D.

You have to use the DN from a user entry to login, i.e. for the user hermes:

ldapwhoami -v -x -h localhost -D "cn=Hermes Conrad,ou=people,dc=planetexpress,dc=com" -w hermes

for amy:

ldapwhoami -v -x -h localhost -D "cn=Amy Wong+sn=Kroker,ou=people,dc=planetexpress,dc=com" -w amy
<!-- gh-comment-id:641221521 --> @rroemhild commented on GitHub (Jun 9, 2020): `-w` is the password for the user entry DN set with `-D`. You have to use the DN from a user entry to login, i.e. for the user hermes: ```sh ldapwhoami -v -x -h localhost -D "cn=Hermes Conrad,ou=people,dc=planetexpress,dc=com" -w hermes ``` for amy: ``` ldapwhoami -v -x -h localhost -D "cn=Amy Wong+sn=Kroker,ou=people,dc=planetexpress,dc=com" -w amy ```
Author
Owner

@montetitan commented on GitHub (Jun 11, 2020):

my issue is jxplorer gets the data via anonymous,
but if i give hermes/hermes or fry/fry via (user+password) it doesnt work,
any way to get it working for user+password?
Screenshot 2020-06-11 at 9 13 20 PM
attached screenshot as well,
anonymous gets me everything but im trying to login via the members and it fails

<!-- gh-comment-id:642755697 --> @montetitan commented on GitHub (Jun 11, 2020): my issue is jxplorer gets the data via anonymous, but if i give hermes/hermes or fry/fry via (user+password) it doesnt work, any way to get it working for user+password? <img width="794" alt="Screenshot 2020-06-11 at 9 13 20 PM" src="https://user-images.githubusercontent.com/34226152/84407495-8ea3f300-ac28-11ea-9489-029f7ef1a0e2.png"> attached screenshot as well, anonymous gets me everything but im trying to login via the members and it fails
Author
Owner

@rroemhild commented on GitHub (Jun 11, 2020):

hermes ist not the User DN. hermes is the value of the attribute uid. If you want to authenticate with user+password you need to perform an ldap search (uid=hermes) to get the DN for the entry that matches the search and then authenticate with DN+password.

<!-- gh-comment-id:642916544 --> @rroemhild commented on GitHub (Jun 11, 2020): hermes ist not the User DN. hermes is the value of the attribute uid. If you want to authenticate with user+password you need to perform an ldap search (uid=hermes) to get the DN for the entry that matches the search and then authenticate with DN+password.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-test-openldap#1
No description provided.