We recently setup osTicket Ticket System and have been testing it to see whether to implement in our office. It would really help to have the ability to authenticate against our existing open directory. I found an article (http://www.bauer-power.net/2010/04/how-to-make-osticket-160-authenticate.html) that talks about using Active Directory and editing the class.staff.php file by replacing the following code:
/*compares user password*/
function check_passwd($password){
return (strlen($this->passwd) && strcmp($this->passwd, MD5($password))==0)?(TRUE):(FALSE);
}
The new code is:
/*compares user password*/
function check_passwd($password){
// Change made for LDAP Auth based on -> http://osticket.com/forums/showthread.php?t=3312
// Change this line to the FQDN of your domain controller
$ds=ldap_connect('mydc.mydomain.local') or die("Couldn't connect to AD!");
// Change this line to the name of your Active Directory domain
if ($ds) {
$domain="mydomain";
$ldapbind = ldap_bind($ds);
if (!@ldap_bind( $ds, $domain."\\".$this->username, $password) ) {
// Auth failed! lets try at osTicket database
return (strlen($this->passwd) && strcmp($this->passwd, MD5($password))==0)?(TRUE):(FALSE);
// return(FALSE);
}
else{
// Auth succeeded!
return(TRUE);
}
// End Changes
}
}
However, it seems that I'm still not able to connect. I'm assuming this is because I need to use OD and not Active Directory. Any help would be greatly appreciated.
Thank you, Aaron