MRSB – Sistema di prenotazione aule active directory windows server 2003 R2

Hi,
first of all, i'm sorry for my bad english!

I solved some problem occurred in ldap authentication with ADS Windows
2003 R2.

i've changed:

auth_ldap.inc in this manner:

function authValidateUser($user, $pass)
{
global $auth;
global $ldap_host;
global $ldap_base_dn;
global $ldap_user_attrib;
global $ldap_filter;
global $account_suffix; // <——- added LINE 26

// establish ldap connection
// the '@' suppresses errors
$ldap = @ldap_connect($ldap_host);
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3); // <——– Added
line 77
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0); //disable plain text
passwords // <——— Added line 78

// Check that connection was established

//if(@ldap_bind($ldap, $dn, $pass)) // <—- changed line 92 from …
if(@ldap_bind($ldap, $user.$account_suffix, $pass)) // <— … to


i've configured
config.inc.php
like this:

# Where is the LDAP server
$ldap_host = "172.21.1.20";
$ldap_base_dn = "cn=users, dc=pippo, dc=local";
$account_suffix = "@pippo.local";
$ldap_user_attrib = "sAMAccountName";

In the follow line there was an error …
#//$ldap_user_filter =
"memberOf=CN=ServicePrenotazioniSale,OU=ServiceGroup,dc=prvprato1,dc=local";

this is correct
$ldap_filter =
"memberOf=CN=ServicePrenotazioniSale,OU=ServiceGroup,dc=pippo,dc=local";

I hope someone can use this information to solve same problem.
Good bye.

P.S.
mrbs is a very good program!!!

Related Posts