Module LDAP En

= Introduction = The LDAP module must be used if you want to synchronize somer Dolibarr entities with a LDAP database. The entities and direction you can synchronize are:
 * User (Module Users) -> LDAP
 * Group (Module Users) -> LDAP
 * LDAP -> User (Module Users)
 * Contact (Module Third parties) -> LDAP
 * Member (Module Foundations) -> LDAP

This assumes that you already have an LDAP server. If this is not the case, you can Install and configure OpenLDAP.

= Installation =

= Configuration =

Information you must supply in the LDAP module setup are:
 * Choose what you want to synchronize
 * LDAP server information (ip, port...)

Once datas are filled, make a test by using button "Test LDAP connection" to be sure they are correct.


 * Enter the organization of your LDAP tree
 * Make matching between Dolibarr fields and LDAP fields.

Once datas are filled, make a test by using button "Test synchronization" to be sure they are correct.

= Usage = For synchronization from Dolibarr to LDAP, once your setup is done, there is nothing to do. Each time you make a change in Dolibarr, the change is also saved into your LDAP.

If you experience an error during LDAP synchronization, all Dolibarr transaction will be canceled and an error message will be shown. Note that LDAP returned error message in PHP are not always accurate. So if message is not clear enough to help you to know what's wrong, take a look a chapter "Errors".

You can however run initial or mass synchronization with some scripts (See chapter Scripts).

= Errors = Because error message returned by PHP function are not accurate, if you experience a message and don't known what's wrong, this is what you can do:
 * Just after error occurs, a file ldap/temp/ldapinput.in is created into your dolibarr documents directory. Go into directory ldap/temp.
 * Open file ldapintput.in, you will find into first lines (as comments), the full ldap command you can run from command line to emulate the same action that PHP send to LDAP server.
 * Run this command. You need to have ldap utilities (ldapadd, ldapmodify and ldapdelete) installed on your computer.
 * Analyze the result. You should get more information on error reason.

= Scripts =
 * Script sync contacts dolibarr2ldap
 * Script sync groups dolibarr2ldap
 * Script sync members dolibarr2ldap
 * Script sync members ldap2dolibarr
 * Script sync users dolibarr2ldap