Avatar of uknet80

asked on 

How to connect LDAP to Active Directory

Hi all,

I haven’t used LDAP to connect to active directory before.  The client webserver is linux and application that connect to windows server 2003 Active directory is a library system called Koha, it needs LDAP configuration, can you help me out with this. Here is the Active Directory

Active Directory Server detail:
Server IP:
Domain: Example.local
Admin anme: administrator      
Password: pass11
The Koha manual to connect to AD is as follow:


Configuring LDAP

To configure Koha to use LDAP, we edit the /etc/koha-dev/etc/koha-conf.xml file and add an LDAP block similar to this:
To configure Koha to use LDAP, we edit the /etc/koha-dev/etc/koha-conf.xml
file and add an LDAP block similar to this:
<useldapserver>1</useldapserver><!-- see C4::Auth_with_ldap for extra
configs you must add if you want to turn this on -->
<ldapserver id="ldapserver" listenref="ldapserver">
<hostname>your hosts ip address or name</hostname>
<base>base dn</base>
<user>LDAP user's dn</user>
<pass>LDAP user's password</pass>
<replicate>1</replicate> <!-- add new users from LDAP to
Koha database -->
<update>1</update> <!-- update existing users in Koha
database -->
<mapping> <!-- match koha SQL field names to your
LDAP record field names -->
<firstname is="givenName" ></firstname>
<surname is="sn" ></surname>
<userid is="uid"></userid>
<password is="userPassword" ></password>
<email is="mail"></email>
<address is="address">Default Address</address>
<city is="city">Default City</city>
<branchcode is="branch">Default Branch Code</branchcode>
<categorycode is="category">Default Catefory Code</

Here is how we configure the LDAP block:
1. Add the LDAP server block before these tags: </config></yazgfs> in the koha-conf.xml file.
2. Set the <useldapserver> tag to 1 to turn LDAP authentication on, set it to 0 to turn it off.
3. Enter the LDAP server's host name or IP address in the tag <hostname>.
4. Enter the LDAP server's base DN in the tag <base>.
5. In the tag <user> enter the DN of an LDAP user with browse privileges to the base DN.
6. Enter the LDAP user's password in the tag <pass>.
7. Set <replicate> tag to 1 if you want to create new users in Koha from the LDAP server. If this is set to 0, the user record must exist in Koha.
8. Set <update> tag to 1 if you want updates to user records on the LDAP server to update user records in Koha as well.
9. The fields listed in the <mapping> block refer to fields in the borrowers tables in Koha.
10. The fields listed in the <mapping> block must include all mandatory fields in the borrowers table except the field borrowernumber. Mandatory fields in the table are—surname, address, city, branchcode, and categorycode (patron category code).
11. The fields listed in the <mapping> block should include other Koha fields that have data in corresponding fields in the LDAP record. This way you can get useful data such as e-mail address or phone number from the LDAP record into Koha.
12. The name following is= refers to the corresponding field in the LDAP server.
13. For each field you can specify a default


can you please tell me what paramiter i have to change from above code.
Windows Server 2003Apache Web Server

Avatar of undefined
Last Comment

8/22/2022 - Mon