<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Continuing onwards with my attempt to pull groups and their members from Active Directory into Request Tracker I’ve made some progress. However, I’m currently stymied – LDAPImport will successfully connect and search for users but when
 re-using the LDAP connection it fails to connect for the group search.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Here’s the debugging information from an rtldapimport run:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Running test import, no data will be changed<o:p></o:p></p>
<p class="MsoNormal">Rerun command with --import to perform the import<o:p></o:p></p>
<p class="MsoNormal">Rerun command with --debug for more information<o:p></o:p></p>
<p class="MsoNormal">connecting to ldap://domaincontroller.alaska.gov<o:p></o:p></p>
<p class="MsoNormal">binding as CN=dor-requesttracker,OU=Security Groups and Accounts,OU=IT,OU=Divisions,OU=DOR,OU=State Departments,DC=soa,DC=alaska,DC=gov<o:p></o:p></p>
<p class="MsoNormal">searching with: base => 'OU=Security Groups and Accounts,OU=IT,OU=Divisions,OU=DOR,OU=State Departments,DC=soa,DC=alaska,DC=gov' control => 'Net::LDAP::Control::Paged=HASH(0x524cd80)' filter => '(&(cn = users))'<o:p></o:p></p>
<p class="MsoNormal">search found 0 objects<o:p></o:p></p>
<p class="MsoNormal">No results found, no import<o:p></o:p></p>
<p class="MsoNormal">Testing group import<o:p></o:p></p>
<p class="MsoNormal">searching with: base => 'OU=Security Groups and Accounts,OU=IT,OU=Divisions,OU=DOR,OU=State Departments,DC=soa,DC=alaska,DC=gov' control => 'Net::LDAP::Control::Paged=HASH(0x86973b8)' filter => '(|(CN=dor-requesttracker-admins)(CN=dor-asd-rt-staff))'<o:p></o:p></p>
<p class="MsoNormal">[Mon Aug  5 17:10:47 2013] [error]: LDAP search failed Can't contact LDAP server (/usr/local/share/request-tracker4/plugins/RT-Extension-LDAPImport/lib/RT/Extension/LDAPImport.pm:1237)<o:p></o:p></p>
<p class="MsoNormal">LDAP search failed Can't contact LDAP server<o:p></o:p></p>
<p class="MsoNormal">search found 0 objects<o:p></o:p></p>
<p class="MsoNormal">No results found, no group import<o:p></o:p></p>
<p class="MsoNormal">Finished test<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Looking at the perl for LDAPImport.pm shows me that the _<i>run</i>_search method is generating the “LDAP search failed” part of the debugging output. I’m assuming this means that Net::LDAP is generating the “Can’t contact LDAP server”
 from $result->code. I feel this hypothesis is further supported by the fact that a ‘grep "contact" LDAPImport.pm’ turn up nothing. It looks like Net:LDAP just gets the base and filter and off it goes. I’ve confirmed that my filter works with ldapsearch.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I there something different I need to do get a successful LDAP bind when looking performing the group import?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">---<o:p></o:p></p>
<p class="MsoNormal">Kevin Elliott<o:p></o:p></p>
<p class="MsoNormal">Networking Specialist II<o:p></o:p></p>
<p class="MsoNormal">Alaska Department of Revenue, ASD-IT<o:p></o:p></p>
<p class="MsoNormal">(907) 465-2314<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>