LDAPï
Setting up LDAP (Lightweight Directory Access Protocol) for Koha allows you to store all user information in a central database which is accessed both by your organisationâs Koha instance and for users to authenticate on other existing systems.
LDAP is a protocol used for file discovery over networks and network authentication.
LDAP configurations are powerful allowing you to customise how Koha and LDAP interact. LDAP can be configured so that new accounts created in LDAP can be synced down into the Koha database, additionally updates to the LDAP user account are synced down to the Koha database.
However Koha cannot sync data up to the LDAP server, thus the data traffic when using LDAP is only one directional.
Auth_By_Bind is set to 1 where a Microsoft Windows Active Directory system is in use in the LDAP database.
Before going through the steps to configure LDAP you will need the following information/actions from the organisation
The organisation will need to open a port to allow access to their AD from the server.
Information on the access to the AD server (IP address/hostname, port, SSL info)
Information on the configuration of the AD server (relevant OUs, DCs, CN formats relative to usernames)
Mapping between AD fields and Koha fields, including defaults
Default values for things not provided by AD (categorycode, branchcode for example)
To authenticate a user do we bind as them (seems to be common for AD) or do we use an account and login with that and then check? If the latter, weâll need details of how to log in
Do the existing usernames in Koha match the usernames that weâll be using to look them up in AD? If so, good. If not, how will we deal with duplicate users?
Steps to set up LDAP with your Koha instance
1 In Linux terminal navigate to the directory containing the koha-conf.xml file which will either be in: * /etc/koha/sites/<instance-name>/ OR * /etc/koha/
2 Open the koha-conf.xml file with root permissions: sudo vi koha-conf.xml
3 Scroll down to the line containing â<useldapserver>0</useldapserver>â and change it to: <useldapserver>1</useldapserver>
4 Then in the next line below write in the LDAP configurations below:
5 Save and exit the koha-conf.xml file
6 Check the LDAP connection works by writing in:
ldapsearch -H ldaps://host.name -s base -x -w ââ -d 1
Note
Note about hostname Hostname can either be a alphanumerical name or it can be the LDAP server IP address (its optional to write port number). By default the ldaps default port number is 636, whilst ldap default port number is 389
Note
Note about the replicate and update fields The replicate LDAP config field for LDAP in the koha-conf.xml file allow the Koha database to be added to with a new borrower account whenever a user logs into Koha (either the staff client or OPAC) with their LDAP username and password (assuming the same username and password does not already exist in the Koha database).
Whereas the update LDAP config field (in the same file allows) allows for user information in the LDAP database to be synced down to the Koha database. e.g. if someone gets married and their surname changes then the new surname only needs to be updated in the existing LDAP database and that will be synced down to the Koha database automatically if the update configuration is set to 1.
About the mapping fields (the fields highlighted green) <city is=âlâ>Athens, OH</city>
The left hand column name (highlighted yellow) is the name of the column in the LDAP database.
The column name inside quote marks (highlighted pink) is the name of the column in the Koha database. NOTE: This can be filled with any value if there is no equivalent column name in the Koha database as exists in the LDAP database.
The value highlighted cyan is the default value for the specified Koha and LDAP columns. So in the above example all user records in the Koha and LDAP databases will by default have the city value of âAthens, OHâ.
Example of the LDAP configurations:
The values in the mapping area are not always the same, and it depends on what is in your organisations LDAP database. For example some organisations do not use <userid> instead each user is only identified by the <email> field and so no <userid> is written.
Troubleshooting LDAP
The log that LDAP errors are printed to depends on several factors:
If plack is not disabled then LDAP errors are displayed in the plack-error.log file If plack is disabled then the location that LDAP errors are printed to is either the opac-error.log file (if the user is logging into the OPAC) or the intranet-error.log file (if the user is logging into the staff client) All of these three log files are accessible in the following directory:
/var/log/koha/<instance>/
Built with Sphinx using a theme provided by Read the Docs.