Hello I would like to know if there is an easy tweak for ldap_auth module in order to make the connect and bind to LDAP server using the same credentials as loginname and password.
My server does not allow anonymous connections and I cannot specify any DN//password pair in the Advanced Configuration for LDAP-auth because that DN/password pair only allows that user to connect, I cannot connect with one user and lookup credentials for a different user.
I don't know If I explained well, I will give an example.
Let's say I have two different users, User1 with password PW1 and User1 with password PW2.
If I put User1/PW1 for non-anonymous searches in Ldap_auth configuration, advanced settings, I can login with user1, but I cannot login with user2 (my ldap server realizes that I am connecting with user1 credentials and later I try to find information about user2, not about user1, so it refuses the 2nd connection).
If I change LDAP_auth configuration, advanced settings and put User2/PW2 for "non anonymous searches", I can login as user2 but not as user1.
I thought I could change the function connect($dn = '', $pass = ''); check first if $dn='', then change $dn and $pass in order to get the username and password that the user introduced, but I don't know if it is the best approach to do this. Also I am not sure which are the username and password variables to use.
Any help would be very appreciated.
Comments
Comment #1
cpugeniusmv commentedI see you found the older issue, so I'll close this one.
#198766: Add ability to perform bind and search with provided username as well as adding account suffix