# LDAP

![](https://748165138-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LH9CCYPqjHw1VKNcuiq%2F-LioVXsO8I_YmhlcnGyg%2F-LioWCwrWtAJmr7LvgJy%2Fgraficos14.png?generation=1562101780558530\&alt=media)This category allows you to configure the synchronization with an LDAP server. It contains a long series of settings which all require a good knowledge of LDAP.

For more information, we invite you to follow LDAP-specific documentation. Note that an ActiveDirectory server can be used as an LDAP server through enabling its LDAP-compatibility mode.

The new LDAP plugin must be configured in main/inc/conf/auth.conf.php through the customization of the following section (the in-line documentation for this plugin is wrong up to Chamilo 1.9.4):

$extldap\_config = array(

//base dommain string

'base\_dn' => 'DC=cblue,DC=be',

//admin distinguished name

'admin\_dn' => 'CN=admin,dc=cblue,dc=be',

//admin password

'admin\_password' => 'pass',

//ldap host

'host' => array('1.2.3.4', '2.3.4.5', '3.4.5.6'),

// filter

// 'filter' => '', // no () arround the string

//'port' => , default on 389

//protocl version (2 or 3)

'protocol\_version' => 3,

// set this to 0 to connect to AD server

'referrals' => 0,

//String used to search the user in ldap. %username will ber replaced by the username.

//See extldap\_get\_user\_search\_string() function below

// 'user\_search' => 'sAMAccountName=%username%', // no () arround the string

'user\_search' => 'uid=%username%', // no () arround the string

//encoding used in ldap (most common are UTF-8 and ISO-8859-1

'encoding' => 'UTF-8',

//Set to true if user info have to be update at each login

'update\_userinfo' => true

);
