Ask not what osTicket community can do for you - ask what you can do for osTicket community

Go Back   osTicket Forums > osTicket 1.6.x > Mods and Customizations

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-13-2010, 02:36 PM
hoffmaao hoffmaao is offline
Junior Member
 
Join Date: Jul 2010
Posts: 1
Default Authentication with Open Directory

We recently setup osticket 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 that talks about using Active Directory and editing the class.staff.php file by replacing the /*compares user password*/ section. The new code is:

Code:
/*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
Reply With Quote
 

Bookmarks

Tags
authenticate, opendirectory, osticket

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:18 AM.