ez projects / active_directory_2003_-_lda...
| UNIX name | Owner | Status | Version | Compatible with |
|---|---|---|---|---|
| active_directory_2003_-_ldap_authentication | oldcontribs_import oldcontribs_import | planning | 1.0 | 3.5.2 |
To enable Windows 2003 LDAP authentication you will have to modify
three files :
- settings/ldap.ini
- kernel/classes/datatypes/ezuser/ezldapuser.php
- cronjobs/ldapusermanage.php
Add this two lines in your ldap.ini to specifiy the user/password used
for authentication.
# Bind LDAP User
LDAPBindUser=ez_ad
# Bind LDAP password
LDAPBindPassword=password
In file kernel/classes/datatypes/ezuser/ezldapuser.php at line 176 add
lines to read ldap.ini file values
$LDAPBindUser = $LDAPIni->variable( 'LDAPSettings', 'LDAPBindUser' );
$LDAPBindPassword = $LDAPIni->variable( 'LDAPSettings',
'LDAPBindPassword' );
At line 228 replace
$r = ldap_bind( $ds );
by
$r = ldap_bind( $ds, $LDAPBindUser, $LDAPBindPassword );
In file cronjobs/ldapusermanage.php at line 62 add lines to read
ldap.ini file values
$LDAPBindUser = $LDAPIni->variable( 'LDAPSettings', 'LDAPBindUser' );
$LDAPBindPassword = $LDAPIni->variable( 'LDAPSettings',
'LDAPBindPassword' );
At line 207 replace
$r = ldap_bind( $ds );
by
$r = ldap_bind( $ds, $LDAPBindUser, $LDAPBindPassword );
Guillaume