LDAP authentication
Hello,
I've commented the check_passwd function; added the code to enable LDAP authentication.
/* compares user password */
function check_passwd($password){
return (strlen($this->passwd) && strcmp($this->passwd, MD5($password))==0)?(TRUE):(FALSE);
}
/*compares user password*/
function check_passwd($password){
// Change made for LDAP Auth
// J. Pastin 1-6-10
//return (strlen($this->passwd) && strcmp($this->passwd, MD5($password))==0)?(TRUE):(FALSE);
// Change this line to the FQDN of your domain controller
$ds=ldap_connect('ldap://frdom026.sxb.bsf.alcatel.fr') or die("Couldn't connect to AD!");
// Change this line to the name of your Active Directory domain
$domain="ou=alcatel";
if (!@ldap_bind( $ds, $domain."\\".$this->username, $password) ) {
// Auth failed!
return(FALSE);
}
else{
// Auth succeeded!
return(TRUE);
}
// End Changes
}
Changed the AD server name and domain name as suggested in osticket techno forums. Still I am unable loginto OSticket via LDAP authentication.
Request you help me.
Thanks & Regards,
Syam B