Last updated
Last updated
The LDAP authentication system in Chamilo has been submitted to various deep changes over time, and the current situation is somewhat confusing and always require some kind of manual update.
A patch by Eric Marguin in version 1.10.0 fixed a series of issues from previous versions, related to import scripts not using the configuration file for LDAP (main/inc/conf/auth.conf.php).
To configure LDAP, check the LDAP variables in main/inc/conf/auth.conf.php.
By default, it will come like this (more or less), where elements to be adapted to your own LDAP server and configuration have been coloured in red :
Once you've got that file setup, you'll have to change configuration.php before a few things are added to your administration interface.
If you look at app/config/configuration.php and search for « ldap », you'll find these 3 lines:
Uncomment them to enable a few additional scripts.
When uncommenting, you'll see the following item appear in the administration panel.
This will give you access to a search list for users on the LDAP server, and options to import those users. Versions 1.9.x of Chamilo LMS, however, might have had a little issue with that, making it actually impossible to search from this screen.
To fix that, you should go and edit the ldapget_users functions in main/auth/external_login/ldap.inc.php. There, you'll see that no matter what mapping you gave in the $extldap_user_correspondance_variable in auth.conf.php, it isn't taken into account. Update that to get the search working.
Note that this should be fixed in Chamilo LMS 1.10.x.
Some synchronization mechanisms are made to be run automatically (through CRON). To find these, look deeper into the main/auth/external_login/ folder.
The ldap_import_all_users.php script, for example, can be executed to automatically insert all users from LDAP (following specific criterias defined in ldap.inc.php) into Chamilo. Please note that, once again, in version 1.9.x, this used to be slightly broken, requiring a review of the ldap.inc.php functions in order to work.