<replicate>0</replicate> <!-- add new users from LDAP to Koha database -->
<update>0</update> <!-- update existing users in Koha database ->
<auth_by_bind>1</auth_by_bind> <!-- set to 1 to authenticate by binding instead of password comparison, e.g., to use Active Directory -->
Auth_with_ldap attempts to lookup the userid in the LDAP directory to fill $userldapentry despite it being unneeded in this case. The information retrieved will be thrown away, thus there is no need to retrieve it. This can cause authentication to fail overall even if the initial bind with the user's credentials succeeded.
Created attachment 2474 [details] [review]
Proposed fix for this bug
This is a proposed fix for this bug. It skips the creation of $userldapentry if neither updating nor replicating are enabled.
Confirm bug from d114ebe80adc7b2c34d08d94c17d302b3ddda4be. search_method must NOT be called if bind has already occurred, because it will bind again and with different credentials depending on config (likely anonymously). This is important for auth_by_bind for obvious reasons, mainly that Active Directory doesn't allow you to view the same record anonymously that you would get when bound as the user.
Even if it were successful (which it isn't), binding twice is logically incorrect and bad for performance.
The amount of complexity in the LDAP code is seriously regrettable.
Tested OK with auth_by_bind, no replicate, no update, no static bind user/pass. Patch sent to the list.
Adding patch status. Increasing importance. This is actually a blocker for LDAP to Active Directory w/ a given config.
Pushed to master, welcome to the Koha committer family Jeremy
Dobrica, can you please run your tests against master.
Testeda against current master, it works fine, thanks.
I would remove comment line with FIXME dpavlin from it, since it is unneeded left-over :-)
Reopening in hopes that we can get update/replicate to work.
Proposing Bug 7099 with a fix
It deals with the Update/Replicate problem in ActiveDirectory (made a separate bug since its not related to the title)
*** Bug 7099 has been marked as a duplicate of this bug. ***
(In reply to comment #7)
> Reopening in hopes that we can get update/replicate to work.
Current master at http://git.koha-community.org includes this fix.