searching for users with mod_vcard_ldap

Hi. I am trying to get ejabberd to setup an basic IM server with ldap authentication. I am able to successfully authenticate and connect from my client. However, I can't seem to get my search working as yet.

Here is the related configuration on the server

  {mod_vcard_ldap,
   [
    {ldap_rootdn, "CN=admin,OU=Users_NonHuman,DC=company,DC=com"},
    {ldap_password, "password"},
    {ldap_base, "CN=Users,DC=company,DC=com"},
    {ldap_uids, [{"sAMAccountName"}]},
    {ldap_filter, ""},
    %% Now we want to define vCard pattern
    {ldap_vcard_map,
     [{"NICKNAME", "%u", []}, % just use user's part of JID as his nickname
      {"GIVEN", "%s", ["givenName"]},
      {"FAMILY", "%s", ["sn"]},
      {"FN", "%s, %s", ["sn", "givenName"]}, % example: "Smith, John"
      {"EMAIL", "%s", ["mail"]}]},
    %% Search form
    {ldap_search_fields,
     [{"User ID", "%u"},
      {"First Name", "givenName"},
      {"Last Name", "sn"},
      {"Email", "mail"}]},
    %% vCard fields to be reported
    %% Note that JID is always returned with search results
    {ldap_search_reported,
     [{"Nick", "%u"},
      {"First Name", "givenName"},
      {"Last Name", "sn"},
      {"Email", "mail"}]}
  ]},

On my client (Miranda IM), I set the user directory to 'vjud.company'. I get the search options for User ID, First Name, Last Name and Email. When I search, I get no matches however.

On the server logs, I see matches were found. However after the matches I see an error.

root@pyrochat:~# cat /var/log/ejabberd/ejabberd.log

=INFO REPORT==== 2009-04-17 23:48:30 ===
D(<0.470.0>:ejabberd_receiver:297) : Received XML on stream = "Doe"

=INFO REPORT==== 2009-04-17 23:48:30 ===
D(<0.471.0>:ejabberd_router:301) : route
from {jid,"username","pyrochat","Work","username","pyrochat",
"Work"}
to {jid,[],"vjud.pyrochat",[],[],"vjud.pyrochat",[]}
packet {xmlelement,"iq",
[{"type","set"},
{"to","vjud.pyrochat"},
{"id","mir_214"},
{"xml:lang","en"}],
[{xmlelement,"query",
[{"xmlns","jabber:iq:search"}],
[{xmlelement,"x",
[{"xmlns","jabber:x:data"},{"type","submit"}],
[{xmlelement,"field",
[{"var","%u"}],
[{xmlelement,"value",[],[]}]},
{xmlelement,"field",
[{"var","givenName"}],
[{xmlelement,"value",[],[]}]},
{xmlelement,"field",
[{"var","sn"}],
[{xmlelement,"value",[],
[{xmlcdata,<<"Doe">>}]}]},
{xmlelement,"field",
[{"var","mail"}],
[{xmlelement,"value",[],[]}]}]}]}]}

=INFO REPORT==== 2009-04-17 23:48:30 ===
D(<0.392.0>:eldap:636) : {searchRequest,
{'SearchRequest',"CN=Users,DC=company,DC=com",
wholeSubtree,neverDerefAliases,30,0,false,
{'and',
[{present,"sAMAccountName"},
{substrings,
{'SubstringFilter',"sn",
{'SubstringFilter_substrings',
[{any,"Doe"}]}}}]},
[]}}

=INFO REPORT==== 2009-04-17 23:48:30 ===
D(<0.392.0>:eldap:697) : {searchResEntry,
{'SearchResultEntry',
"CN=John Doe,CN=Users,DC=company,DC=com",
[{'PartialAttributeList_SEQOF',
"objectClass",
["top","person","organizationalPerson",
"user"]},
{'PartialAttributeList_SEQOF',"cn",
["John Doe"]},
{'PartialAttributeList_SEQOF',"sn",
["Doe"]},
{'PartialAttributeList_SEQOF',"c",["US"]},
{'PartialAttributeList_SEQOF',"l",
["Los Angeles"]},
{'PartialAttributeList_SEQOF',"st",["CA"]},
{'PartialAttributeList_SEQOF',"title",
["Sr AB Manager"]},
{'PartialAttributeList_SEQOF',"postalCode",
["12345"]},
{'PartialAttributeList_SEQOF',
"physicalDeliveryOfficeName",
["Los Angeles HQ"]},
{'PartialAttributeList_SEQOF',
"telephoneNumber",
["210.344.4444"]},
{'PartialAttributeList_SEQOF',"givenName",
["John"]},
{'PartialAttributeList_SEQOF',
"distinguishedName",
["CN=John Doe,CN=Users,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"instanceType",
["4"]},
{'PartialAttributeList_SEQOF',
"whenCreated",
["20050322234331.0Z"]},
{'PartialAttributeList_SEQOF',
"whenChanged",
["20090409175438.0Z"]},
{'PartialAttributeList_SEQOF',
"displayName",
["John Doe"]},
{'PartialAttributeList_SEQOF',"uSNCreated",
["15969"]},
{'PartialAttributeList_SEQOF',"memberOf",
["CN=dev-pycifs,OU=Groups,DC=company,DC=com",
"CN=company-fips,OU=Groups,DC=company,DC=com",
"CN=qa-mgmt,OU=Groups,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',"uSNChanged",
["34776702"]},
{'PartialAttributeList_SEQOF',"co",
["United States"]},
{'PartialAttributeList_SEQOF',"department",
["ABC assurance"]},
{'PartialAttributeList_SEQOF',"company",
["Company Technology"]},
{'PartialAttributeList_SEQOF',"homeMTA",
["CN=Microsoft MTA,CN=MAILBOXES,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"proxyAddresses",
["X400:C=us;A= ;P=NBT Technology;O=Exchange;S=Doe;G=John;",
"smtp:jDoe@Company.com",
"SMTP:John.Doe@Company.com",
"smtp:jDoe@exchange.company.com",
"smtp:jDoe@Companytechnology.com",
"smtp:jDoe@mail.Company.com",
"smtp:jDoe@company.com",
"smtp:jDoe@autosupport.Company.com"]},
{'PartialAttributeList_SEQOF',"homeMDB",
["CN=Mailbox Database,CN=SG7,CN=InformationStore,CN=MAILBOXES,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"streetAddress",
["213 Hello Street"]},
{'PartialAttributeList_SEQOF',
"mDBUseDefaults",
["TRUE"]},
{'PartialAttributeList_SEQOF',
"directReports",
["CN=AAA K. LNU,CN=Users,DC=company,DC=com",
"CN=BBB LNU,CN=Users,DC=company,DC=com",
"CN=HHH LNU,CN=Users,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"mailNickname",
["jDoe"]},
{'PartialAttributeList_SEQOF',
"employeeNumber",
["2343435"]},
{'PartialAttributeList_SEQOF',
"employeeType",
["EMP"]},
{'PartialAttributeList_SEQOF',"name",
["John Doe"]},
{'PartialAttributeList_SEQOF',"objectGUID",
[[13,140,71,178,171,54,218,65,150,189,
169,107,184,248,222,148]]},
{'PartialAttributeList_SEQOF',
"userAccountControl",
["66048"]},
{'PartialAttributeList_SEQOF',
"badPwdCount",
["0"]},
{'PartialAttributeList_SEQOF',"codePage",
["0"]},
{'PartialAttributeList_SEQOF',
"countryCode",
["0"]},
{'PartialAttributeList_SEQOF',
"badPasswordTime",
["128829017011406114"]},
{'PartialAttributeList_SEQOF',"lastLogoff",
["0"]},
{'PartialAttributeList_SEQOF',"lastLogon",
["128837073872865304"]},
{'PartialAttributeList_SEQOF',"pwdLastSet",
["127560763823206883"]},
{'PartialAttributeList_SEQOF',
"primaryGroupID",
["513"]},
{'PartialAttributeList_SEQOF',
"userParameters",
["m: d\t "]},
{'PartialAttributeList_SEQOF',"objectSid",
[[1,5,0,0,0,0,0,5,21,0,0,0,254,38,198,
72,250,79,12,47,35,95,99,107,152,5,0,
0]]},
{'PartialAttributeList_SEQOF',
"accountExpires",
["9223372036854775807"]},
{'PartialAttributeList_SEQOF',"logonCount",
["1758"]},
{'PartialAttributeList_SEQOF',
"sAMAccountName",
["jDoe"]},
{'PartialAttributeList_SEQOF',"division",
["Research and Development"]},
{'PartialAttributeList_SEQOF',
"sAMAccountType",
["805306368"]},
{'PartialAttributeList_SEQOF',
"showInAddressBook",
["CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com",
"CN=All Users,CN=All Address Lists,CN=Address Lists Container,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"managedObjects",
["CN=qa-apps,OU=Groups,DC=company,DC=com",
"CN=swifttest-users,OU=Groups,DC=company,DC=com",
"CN=qa-team-auth,OU=Groups,DC=company,DC=com",
"CN=petfood-events,OU=Groups,DC=company,DC=com",
"CN=qa-team-petfood,OU=Groups,DC=company,DC=com",
"CN=qa-team-tools,OU=Groups,DC=company,DC=com",
"CN=qa-team-apps,OU=Groups,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"legacyExchangeDN",
["/o=NBT Technology/ou=First Administrative Group/cn=Recipients/cn=jDoe"]},
{'PartialAttributeList_SEQOF',
"userPrincipalName",
["jDoe@company.com"]},
{'PartialAttributeList_SEQOF',
"objectCategory",
["CN=Person,CN=Schema,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"msNPAllowDialin",
["TRUE"]},
{'PartialAttributeList_SEQOF',
"dSCorePropagationData",
["20090402221254.0Z",
"20090202172103.0Z",
"20080429175437.0Z",
"20070605164322.0Z",
"16010714223649.0Z"]},
{'PartialAttributeList_SEQOF',
"lastLogonTimestamp",
["128837729599122932"]},
{'PartialAttributeList_SEQOF',
"textEncodedORAddress",
["C=us;A= ;P=NBT Technology;O=Exchange;S=Doe;G=John;"]},
{'PartialAttributeList_SEQOF',"mail",
["John.Doe@Company.com"]},
{'PartialAttributeList_SEQOF',"roomNumber",
["199-5-026"]},
{'PartialAttributeList_SEQOF',"manager",
["CN=Michael Michon,CN=Users,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"departmentNumber",
["520"]},
{'PartialAttributeList_SEQOF',"uidNumber",
["1122"]},
{'PartialAttributeList_SEQOF',"gidNumber",
["100"]},
{'PartialAttributeList_SEQOF',"gecos",
["John Doe"]},
{'PartialAttributeList_SEQOF',
"unixHomeDirectory",
["/u/jDoe"]},
{'PartialAttributeList_SEQOF',"loginShell",
["/bin/bash"]},
{'PartialAttributeList_SEQOF',
"msExchHomeServerName",
["/o=NBT Technology/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=MAILBOXES"]},
{'PartialAttributeList_SEQOF',
"msExchALObjectVersion",
["56"]},
{'PartialAttributeList_SEQOF',
"msExchMailboxSecurityDescriptor",
[[1,0,4,128,120,0,0,0,148,0,0,0,0,0,0,0,
20,0,0,0,4,0,100,0,1,0,0,0,0,2,20,0,3,
0,2,0,1,1,0,0,0,0,0,5,10,0,0,0,46,0,
99,0,111,0,109,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,1,5,
0,0,0,0,0,5,21,0,0,0,254,38,198,72,
250,79,12,47,35,95,99,107,170,4,0,0,1,
5,0,0,0,0,0,5,21,0,0,0,254,38,198,72,
250,79,12,47,35,95,99,107,170,4,0,0]]},
{'PartialAttributeList_SEQOF',
"msExchUserAccountControl",
["0"]},
{'PartialAttributeList_SEQOF',
"msExchMailboxGuid",
[[165,249,101,114,87,35,172,73,153,218,
215,33,243,219,132,215]]},
{'PartialAttributeList_SEQOF',
"msExchPoliciesIncluded",
["{A7C3A250-4005-4C88-B02A-78D1A295F995},{26491CFC-9E50-4857-861B-0CB8DF22B5D7}"]},
{'PartialAttributeList_SEQOF',
"msExchRecipientDisplayType",
["1073741824"]},
{'PartialAttributeList_SEQOF',
"msExchUserCulture",
["en-US"]},
{'PartialAttributeList_SEQOF',
"msExchVersion",
["4535486012416"]},
{'PartialAttributeList_SEQOF',
"msExchRecipientTypeDetails",
["1"]},
{'PartialAttributeList_SEQOF',
"msExchMobileMailboxFlags",
["1"]}]}}

=INFO REPORT==== 2009-04-17 23:48:30 ===
D(<0.392.0>:eldap:697) : {searchResEntry,
{'SearchResultEntry',
"CN=Neal Doe,CN=Users,DC=company,DC=com",
[{'PartialAttributeList_SEQOF',
"objectClass",
["top","person","organizationalPerson",
"user"]},
{'PartialAttributeList_SEQOF',"cn",
["Neal Doe"]},
{'PartialAttributeList_SEQOF',"sn",
["Doe"]},
{'PartialAttributeList_SEQOF',"c",["US"]},
{'PartialAttributeList_SEQOF',"l",
["Los Angeles"]},
{'PartialAttributeList_SEQOF',"st",["CA"]},
{'PartialAttributeList_SEQOF',"title",
["Member of Technical Staff"]},
{'PartialAttributeList_SEQOF',"postalCode",
["12345"]},
{'PartialAttributeList_SEQOF',
"physicalDeliveryOfficeName",
["Los Angeles HQ"]},
{'PartialAttributeList_SEQOF',
"telephoneNumber",
["210.247.6371"]},
{'PartialAttributeList_SEQOF',
"userCertificate",
[[48,130,5,139,48,130,4,115,160,3,2,1,2,
2,10,48,230,42,68,0,0,0,0,1,142,48,13,
6,9,42,134,72,134,247,13,1,1,5,5,0,48,
64,49,19,48,17,6,10,9,146,38,137,147,
242,44,100,1,25,22,3,99,111,109,49,23,
48,21,6,10,9,146,38,137,147,242,44,
100,1,25,22,7,110,98,116,116,101,99,
104,49,16,48,14,6,3,85,4,3,19,7,78,66,
84,84,69,67,72,48,30,23,13,48,57,48,
49,50,57,49,55,48,53,53,51,90,23,13,
49,48,48,49,50,57,49,55,48,53,53,51,
90,48,83,49,19,48,17,6,10,9,146,38,
137,147,242,44,100,1,25,22,3,99,111,
109,49,23,48,21,6,10,9,146,38,137,147,
242,44,100,1,25,22,7,110,98,116,116,
101,99,104,49,14,48,12,6,3,85,4,3,19,
5,85,115,101,114,115,49,19,48,17,6,3,
85,4,3,19,10,78,101,97,108,32,77,101,
121,101,114,48,129,159,48,13,6,9,42,
134,72,134,247,13,1,1,1,5,0,3,129,141,
0,48,129,137,2,129,129,0,227,153,104,
17,137,250,155,245,172,105,205,59,153,
182,218,252,49,25,41,229,204,185,170,
39,75,113,141,62,243,242,252,180,179,
152,113,3,110,154,109,64,6,61,89,249,
99,89,43,78,194,182,91,205,194,214,58,
232,35,170,50,180,18,241,250,153,147,
77,42,183,57,154,4,128,155,61,38,38,
233,75,5,227,105,79,219,251,162,157,
94,218,60,155,36,81,255,191,187,132,
34,1,116,212,49,187,138,208,252,174,
155,137,171,80,164,61,143,52,157,79,
255,93,18,198,155,120,9,17,236,248,26,
231,2,3,1,0,1,163,130,2,246,48,130,2,
242,48,11,6,3,85,29,15,4,4,3,2,5,32,
48,54,6,9,42,134,72,134,247,13,1,9,15,
4,41,48,39,48,13,6,8,42,134,72,134,
247,13,3,2,2,1,56,48,13,6,8,42,134,72,
134,247,13,3,4,2,1,56,48,7,6,5,43,14,
3,2,7,48,21,6,9,43,6,1,4,1,130,55,20,
2,4,8,30,6,0,69,0,70,0,83,48,21,6,3,
85,29,37,4,14,48,12,6,10,43,6,1,4,1,
130,55,10,3,4,48,45,6,3,85,29,17,4,38,
48,36,160,34,6,10,43,6,1,4,1,130,55,
20,2,3,160,20,12,18,110,109,101,121,
101,114,64,110,98,116,116,101,99,104,
46,99,111,109,48,29,6,3,85,29,14,4,22,
4,20,119,67,92,78,135,137,47,17,211,
224,79,227,42,173,70,130,90,105,109,
173,48,31,6,3,85,29,35,4,24,48,22,128,
20,5,161,9,110,241,23,18,81,206,78,
142,173,214,90,143,230,57,40,82,62,48,
129,250,6,3,85,29,31,4,129,242,48,129,
239,48,129,236,160,129,233,160,129,
230,134,129,175,108,100,97,112,58,47,
47,47,67,78,61,78,66,84,84,69,67,72,
44,67,78,61,99,97,114,110,101,114,111,
115,44,67,78,61,67,68,80,44,67,78,61,
80,117,98,108,105,99,37,50,48,75,101,
121,37,50,48,83,101,114,118,105,99,
101,115,44,67,78,61,83,101,114,118,
105,99,101,115,44,67,78,61,67,111,110,
102,105,103,117,114,97,116,105,111,
110,44,68,67,61,110,98,116,116,101,99,
104,44,68,67,61,99,111,109,63,99,101,
114,116,105,102,105,99,97,116,101,82,
101,118,111,99,97,116,105,111,110,76,
105,115,116,63,98,97,115,101,63,111,
98,106,101,99,116,67,108,97,115,115,
61,99,82,76,68,105,115,116,114,105,98,
117,116,105,111,110,80,111,105,110,
116,134,50,104,116,116,112,58,47,47,
99,97,114,110,101,114,111,115,46,110,
98,116,116,101,99,104,46,99,111,109,
47,67,101,114,116,69,110,114,111,108,
108,47,78,66,84,84,69,67,72,46,99,114,
108,48,130,1,15,6,8,43,6,1,5,5,7,1,1,
4,130,1,1,48,129,254,48,129,166,6,8,
43,6,1,5,5,7,48,2,134,129,153,108,100,
97,112,58,47,47,47,67,78,61,78,66,84,
84,69,67,72,44,67,78,61,65,73,65,44,
67,78,61,80,117,98,108,105,99,37,50,
48,75,101,121,37,50,48,83,101,114,118,
105,99,101,115,44,67,78,61,83,101,114,
118,105,99,101,115,44,67,78,61,67,111,
110,102,105,103,117,114,97,116,105,
111,110,44,68,67,61,110,98,116,116,
101,99,104,44,68,67,61,99,111,109,63,
99,65,67,101,114,116,105,102,105,99,
97,116,101,63,98,97,115,101,63,111,98,
106,101,99,116,67,108,97,115,115,61,
99,101,114,116,105,102,105,99,97,116,
105,111,110,65,117,116,104,111,114,
105,116,121,48,83,6,8,43,6,1,5,5,7,48,
2,134,71,104,116,116,112,58,47,47,99,
97,114,110,101,114,111,115,46,110,98,
116,116,101,99,104,46,99,111,109,47,
67,101,114,116,69,110,114,111,108,108,
47,99,97,114,110,101,114,111,115,46,
110,98,116,116,101,99,104,46,99,111,
109,95,78,66,84,84,69,67,72,46,99,114,
116,48,13,6,9,42,134,72,134,247,13,1,
1,5,5,0,3,130,1,1,0,37,76,253,235,234,
46,254,190,178,32,184,6,162,118,198,
95,64,31,54,30,243,171,78,201,32,170,
255,59,212,67,136,238,164,146,85,103,
214,180,205,234,124,173,27,218,210,
123,26,83,63,232,140,112,137,245,22,
223,196,62,177,11,146,154,163,59,185,
252,130,125,110,7,39,122,148,154,168,
135,54,195,159,154,23,98,215,4,252,
252,78,188,78,121,253,20,132,0,27,207,
129,3,245,144,96,73,60,57,57,165,9,87,
66,144,118,169,49,190,24,45,195,97,80,
93,83,168,231,223,178,203,48,66,118,
188,64,17,128,108,50,84,134,0,168,209,
24,169,28,165,240,85,89,25,125,173,
152,125,116,118,117,111,130,0,180,167,
158,60,138,97,209,227,171,166,110,137,
177,135,111,139,46,172,112,64,66,75,
240,159,230,243,136,67,127,28,161,94,
71,123,247,2,1,154,41,242,55,224,216,
67,0,147,132,250,200,35,45,83,105,187,
105,125,223,148,6,18,75,99,128,132,
185,201,68,73,159,215,83,235,197,246,
186,140,201,13,241,115,243,101,188,
153,76,242,52,155,6,98,28,123,61,193,
73,109,60,135]]},
{'PartialAttributeList_SEQOF',"givenName",
["Neal"]},
{'PartialAttributeList_SEQOF',
"distinguishedName",
["CN=Neal Doe,CN=Users,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"instanceType",
["4"]},
{'PartialAttributeList_SEQOF',
"whenCreated",
["20070206200919.0Z"]},
{'PartialAttributeList_SEQOF',
"whenChanged",
["20090418022526.0Z"]},
{'PartialAttributeList_SEQOF',
"displayName",
["Neal Doe"]},
{'PartialAttributeList_SEQOF',"uSNCreated",
["2409964"]},
{'PartialAttributeList_SEQOF',"memberOf",
["CN=company-locale-employees,OU=Groups,DC=company,DC=com",
"CN=company-sslvpn-users,OU=Groups,DC=company,DC=com",
"CN=eng-samoa-beta,OU=Groups,DC=company,DC=com",
"CN=dev-fiji,OU=Groups,DC=company,DC=com",
"CN=company-oracleusers,OU=Groups,DC=company,DC=com",
"CN=dev,OU=Groups,DC=company,DC=com",
"CN=company-hq-locale,OU=Groups,DC=company,DC=com",
"CN=company-us,OU=Groups,DC=company,DC=com",
"CN=company-all,OU=Groups,DC=company,DC=com",
"CN=eng,OU=Groups,DC=company,DC=com",
"CN=eng-fiji,OU=Groups,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',"uSNChanged",
["35201180"]},
{'PartialAttributeList_SEQOF',"co",
["United States"]},
{'PartialAttributeList_SEQOF',"department",
["Development"]},
{'PartialAttributeList_SEQOF',"company",
["Company Technology"]},
{'PartialAttributeList_SEQOF',"homeMTA",
["CN=Microsoft MTA,CN=MAILBOXES,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"proxyAddresses",
["X400:C=us;A= ;P=NBT Technology;O=Exchange;S=Doe;G=Neal;",
"smtp:nDoe@autosupport.Company.com",
"smtp:nDoe@exchange.company.com",
"smtp:nDoe@mail.Company.com",
"smtp:nDoe@company.com",
"smtp:nDoe@Companytechnology.com",
"smtp:nDoe@Company.com",
"SMTP:Neal.Doe@Company.com"]},
{'PartialAttributeList_SEQOF',"homeMDB",
["CN=Mailbox Database,CN=SG3,CN=InformationStore,CN=MAILBOXES,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"streetAddress",
["213 Hello Street"]},
{'PartialAttributeList_SEQOF',
"mDBUseDefaults",
["TRUE"]},
{'PartialAttributeList_SEQOF',
"mailNickname",
["nDoe"]},
{'PartialAttributeList_SEQOF',
"employeeNumber",
["110885"]},
{'PartialAttributeList_SEQOF',
"employeeType",
["EMP"]},
{'PartialAttributeList_SEQOF',"name",
["Neal Doe"]},
{'PartialAttributeList_SEQOF',"objectGUID",
[[119,150,208,186,212,180,128,76,168,
101,15,238,226,7,118,49]]},
{'PartialAttributeList_SEQOF',
"userAccountControl",
["66048"]},
{'PartialAttributeList_SEQOF',
"badPwdCount",
["0"]},
{'PartialAttributeList_SEQOF',"codePage",
["0"]},
{'PartialAttributeList_SEQOF',
"countryCode",
["0"]},
{'PartialAttributeList_SEQOF',
"badPasswordTime",
["128845042990932894"]},
{'PartialAttributeList_SEQOF',"lastLogoff",
["0"]},
{'PartialAttributeList_SEQOF',"lastLogon",
["128845043048902386"]},
{'PartialAttributeList_SEQOF',"pwdLastSet",
["128164701038714116"]},
{'PartialAttributeList_SEQOF',
"primaryGroupID",
["513"]},
{'PartialAttributeList_SEQOF',"objectSid",
[[1,5,0,0,0,0,0,5,21,0,0,0,254,38,198,
72,250,79,12,47,35,95,99,107,168,12,0,
0]]},
{'PartialAttributeList_SEQOF',
"accountExpires",
["9223372036854775807"]},
{'PartialAttributeList_SEQOF',"logonCount",
["2839"]},
{'PartialAttributeList_SEQOF',
"sAMAccountName",
["nDoe"]},
{'PartialAttributeList_SEQOF',"division",
["Research and Development"]},
{'PartialAttributeList_SEQOF',
"sAMAccountType",
["805306368"]},
{'PartialAttributeList_SEQOF',
"showInAddressBook",
["CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com",
"CN=All Users,CN=All Address Lists,CN=Address Lists Container,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"legacyExchangeDN",
["/o=NBT Technology/ou=First Administrative Group/cn=Recipients/cn=nDoe"]},
{'PartialAttributeList_SEQOF',
"userPrincipalName",
["nDoe@company.com"]},
{'PartialAttributeList_SEQOF',
"lockoutTime",
["0"]},
{'PartialAttributeList_SEQOF',
"objectCategory",
["CN=Person,CN=Schema,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"dSCorePropagationData",
["20090402221254.0Z",
"20090202172103.0Z",
"20080429175437.0Z",
"20070605164322.0Z",
"16010714223649.0Z"]},
{'PartialAttributeList_SEQOF',
"lastLogonTimestamp",
["128844945890549827"]},
{'PartialAttributeList_SEQOF',
"textEncodedORAddress",
["C=us;A= ;P=NBT Technology;O=Exchange;S=Doe;G=Neal;"]},
{'PartialAttributeList_SEQOF',"mail",
["Neal.Doe@Company.com"]},
{'PartialAttributeList_SEQOF',"manager",
["CN=Chuck Fraleigh,CN=Users,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"departmentNumber",
["510"]},
{'PartialAttributeList_SEQOF',"uidNumber",
["1357"]},
{'PartialAttributeList_SEQOF',"gidNumber",
["100"]},
{'PartialAttributeList_SEQOF',"gecos",
["Neal Doe"]},
{'PartialAttributeList_SEQOF',
"unixHomeDirectory",
["/u/nDoe"]},
{'PartialAttributeList_SEQOF',"loginShell",
["/bin/tcsh"]},
{'PartialAttributeList_SEQOF',
"msExchHomeServerName",
["/o=NBT Technology/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=MAILBOXES"]},
{'PartialAttributeList_SEQOF',
"msExchALObjectVersion",
["49"]},
{'PartialAttributeList_SEQOF',
"msExchMailboxSecurityDescriptor",
[[1,0,4,128,120,0,0,0,148,0,0,0,0,0,0,0,
20,0,0,0,4,0,100,0,1,0,0,0,0,2,20,0,3,
0,2,0,1,1,0,0,0,0,0,5,10,0,0,0,0,0,0,
0,99,0,104,0,47,0,99,0,110,0,61,0,67,
0,111,0,0,1,0,0,0,1,0,0,1,0,0,0,32,0,
0,0,105,0,111,0,110,0,47,0,99,0,110,0,
61,0,83,0,101,0,114,0,118,0,105,0,99,
0,101,0,115,0,47,0,99,0,110,0,1,5,0,0,
0,0,0,5,21,0,0,0,254,38,198,72,250,79,
12,47,35,95,99,107,52,12,0,0,1,5,0,0,
0,0,0,5,21,0,0,0,254,38,198,72,250,79,
12,47,35,95,99,107,52,12,0,0]]},
{'PartialAttributeList_SEQOF',
"msExchUserAccountControl",
["0"]},
{'PartialAttributeList_SEQOF',
"msExchMailboxGuid",
[[235,41,43,165,192,252,152,69,153,80,
132,21,212,129,124,105]]},
{'PartialAttributeList_SEQOF',
"msExchPoliciesIncluded",
["{A7C3A250-4005-4C88-B02A-78D1A295F995},{26491CFC-9E50-4857-861B-0CB8DF22B5D7}"]},
{'PartialAttributeList_SEQOF',
"msExchRecipientDisplayType",
["1073741824"]},
{'PartialAttributeList_SEQOF',
"msExchUserCulture",
["en-US"]},
{'PartialAttributeList_SEQOF',
"msExchVersion",
["4535486012416"]},
{'PartialAttributeList_SEQOF',
"msExchRecipientTypeDetails",
["1"]}]}}

=INFO REPORT==== 2009-04-17 23:48:30 ===
D(<0.392.0>:eldap:697) : {searchResEntry,
{'SearchResultEntry',
"CN=Robin NieDoe,CN=Users,DC=company,DC=com",
[{'PartialAttributeList_SEQOF',
"objectClass",
["top","person","organizationalPerson",
"user"]},
{'PartialAttributeList_SEQOF',"cn",
["Robin NieDoe"]},
{'PartialAttributeList_SEQOF',"sn",
["NieDoe"]},
{'PartialAttributeList_SEQOF',"c",["US"]},
{'PartialAttributeList_SEQOF',"l",
["Los Angeles"]},
{'PartialAttributeList_SEQOF',"st",["CA"]},
{'PartialAttributeList_SEQOF',"title",
["Training Director"]},
{'PartialAttributeList_SEQOF',"postalCode",
["12345"]},
{'PartialAttributeList_SEQOF',
"physicalDeliveryOfficeName",
["Los Angeles HQ"]},
{'PartialAttributeList_SEQOF',
"telephoneNumber",
["210.247.8107"]},
{'PartialAttributeList_SEQOF',"givenName",
["Robin"]},
{'PartialAttributeList_SEQOF',
"distinguishedName",
["CN=Robin NieDoe,CN=Users,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"instanceType",
["4"]},
{'PartialAttributeList_SEQOF',
"whenCreated",
["20071221193702.0Z"]},
{'PartialAttributeList_SEQOF',
"whenChanged",
["20090407150224.0Z"]},
{'PartialAttributeList_SEQOF',
"displayName",
["Robin NieDoe"]},
{'PartialAttributeList_SEQOF',"uSNCreated",
["11413287"]},
{'PartialAttributeList_SEQOF',"memberOf",
["CN=company-thinkfast,OU=Groups,DC=company,DC=com",
"CN=company-locale-employees,OU=Groups,DC=company,DC=com",
"CN=company-hr-mgcert,OU=Groups,DC=company,DC=com",
"CN=company-isr-public,OU=Groups,DC=company,DC=com",
"CN=company-oracleusers,OU=Groups,DC=company,DC=com",
"CN=company-marketing-private,OU=Groups,DC=company,DC=com",
"CN=company-hq-locale,OU=Groups,DC=company,DC=com",
"CN=company-us,OU=Groups,DC=company,DC=com",
"CN=company-all,OU=Groups,DC=company,DC=com",
"CN=sales,OU=Groups,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',"uSNChanged",
["34645443"]},
{'PartialAttributeList_SEQOF',"department",
["Human resources"]},
{'PartialAttributeList_SEQOF',"company",
["Company Technology"]},
{'PartialAttributeList_SEQOF',"homeMTA",
["CN=Microsoft MTA,CN=MAILBOXES,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"proxyAddresses",
["smtp:rnieDoe@autosupport.Company.com",
"smtp:rnieDoe@exchange.company.com",
"smtp:rnieDoe@mail.Company.com",
"smtp:rnieDoe@company.com",
"smtp:rnieDoe@Companytechnology.com",
"smtp:rnieDoe@Company.com",
"X400:C=us;A= ;P=NBT Technology;O=Exchange;S=NieDoe;G=Robin;",
"SMTP:Robin.NieDoe@Company.com"]},
{'PartialAttributeList_SEQOF',"homeMDB",
["CN=Mailbox Database,CN=SG22,CN=InformationStore,CN=MAILBOXES,CN=Servers,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"streetAddress",
["213 Hello Street"]},
{'PartialAttributeList_SEQOF',
"garbageCollPeriod",
["1209600"]},
{'PartialAttributeList_SEQOF',
"mDBUseDefaults",
["TRUE"]},
{'PartialAttributeList_SEQOF',
"mailNickname",
["rnieDoe"]},
{'PartialAttributeList_SEQOF',
"protocolSettings",
["HTTP§1§1§§§§§§","OWA§1"]},
{'PartialAttributeList_SEQOF',
"internetEncoding",
["0"]},
{'PartialAttributeList_SEQOF',
"employeeNumber",
["111233"]},
{'PartialAttributeList_SEQOF',
"employeeType",
["EMP"]},
{'PartialAttributeList_SEQOF',"name",
["Robin NieDoe"]},
{'PartialAttributeList_SEQOF',"objectGUID",
[[190,58,182,240,211,99,143,79,161,108,
75,202,125,136,82,221]]},
{'PartialAttributeList_SEQOF',
"userAccountControl",
["66048"]},
{'PartialAttributeList_SEQOF',
"badPwdCount",
["0"]},
{'PartialAttributeList_SEQOF',"codePage",
["0"]},
{'PartialAttributeList_SEQOF',
"countryCode",
["0"]},
{'PartialAttributeList_SEQOF',
"badPasswordTime",
["128806620574489523"]},
{'PartialAttributeList_SEQOF',"lastLogoff",
["0"]},
{'PartialAttributeList_SEQOF',"lastLogon",
["128836158299760300"]},
{'PartialAttributeList_SEQOF',"pwdLastSet",
["128442210867599845"]},
{'PartialAttributeList_SEQOF',
"primaryGroupID",
["513"]},
{'PartialAttributeList_SEQOF',"objectSid",
[[1,5,0,0,0,0,0,5,21,0,0,0,254,38,198,
72,250,79,12,47,35,95,99,107,59,20,0,
0]]},
{'PartialAttributeList_SEQOF',
"accountExpires",
["9223372036854775807"]},
{'PartialAttributeList_SEQOF',"logonCount",
["345"]},
{'PartialAttributeList_SEQOF',
"sAMAccountName",
["rnieDoe"]},
{'PartialAttributeList_SEQOF',"division",
["Employee Services"]},
{'PartialAttributeList_SEQOF',
"sAMAccountType",
["805306368"]},
{'PartialAttributeList_SEQOF',
"showInAddressBook",
["CN=Default Global Address List,CN=All Global Address Lists,CN=Address Lists Container,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com",
"CN=All Users,CN=All Address Lists,CN=Address Lists Container,CN=NBT Technology,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"managedObjects",
["CN=company-directors,OU=Groups,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"legacyExchangeDN",
["/o=NBT Technology/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=rnieDoe"]},
{'PartialAttributeList_SEQOF',
"userPrincipalName",
["rnieDoe@company.com"]},
{'PartialAttributeList_SEQOF',
"objectCategory",
["CN=Person,CN=Schema,CN=Configuration,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"dSCorePropagationData",
["20090402221254.0Z",
"20090202172103.0Z",
"20080429175438.0Z",
"16010101181633.0Z"]},
{'PartialAttributeList_SEQOF',
"lastLogonTimestamp",
["128835293687520919"]},
{'PartialAttributeList_SEQOF',
"textEncodedORAddress",
["C=us;A= ;P=NBT Technology;O=Exchange;S=NieDoe;G=Robin;"]},
{'PartialAttributeList_SEQOF',"mail",
["Robin.NieDoe@Company.com"]},
{'PartialAttributeList_SEQOF',"manager",
["CN=Mike Guerchon,CN=Users,DC=company,DC=com"]},
{'PartialAttributeList_SEQOF',
"departmentNumber",
["920"]},
{'PartialAttributeList_SEQOF',
"msExchHomeServerName",
["/o=NBT Technology/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=MAILBOXES"]},
{'PartialAttributeList_SEQOF',
"msExchMailboxSecurityDescriptor",
[[1,0,4,128,20,0,0,0,32,0,0,0,0,0,0,0,
44,0,0,0,1,1,0,0,0,0,0,5,10,0,0,0,1,1,
0,0,0,0,0,5,10,0,0,0,2,0,28,0,1,0,0,0,
0,2,20,0,1,0,2,0,1,1,0,0,0,0,0,5,10,0,
0,0]]},
{'PartialAttributeList_SEQOF',
"msExchUserAccountControl",
["0"]},
{'PartialAttributeList_SEQOF',
"msExchMailboxGuid",
[[233,99,67,127,48,177,215,70,157,190,
162,154,74,20,103,21]]},
{'PartialAttributeList_SEQOF',
"msExchPoliciesIncluded",
["{A7C3A250-4005-4C88-B02A-78D1A295F995},{26491CFC-9E50-4857-861B-0CB8DF22B5D7}"]},
{'PartialAttributeList_SEQOF',
"msExchMDBRulesQuota",
["64"]},
{'PartialAttributeList_SEQOF',
"msExchRecipientDisplayType",
["1073741824"]},
{'PartialAttributeList_SEQOF',
"msExchUserCulture",
["en-US"]},
{'PartialAttributeList_SEQOF',
"msExchVersion",
["4535486012416"]},
{'PartialAttributeList_SEQOF',
"msExchRecipientTypeDetails",
["1"]}]}}

=INFO REPORT==== 2009-04-17 23:48:30 ===
D(<0.392.0>:eldap:697) : {searchResDone,
{'LDAPResult',success,[],[],asn1_NOVALUE}}

=ERROR REPORT==== 2009-04-17 23:48:30 ===
Error in process <0.1344.0> on node 'ejabberd@pyrochat' with exit value: {function_clause,[{eldap_utils,find_ldap_attrs,[[{"sAMAccountName"}],[{"objectClass",["top","person","organizationalPerson","user"]},{"cn",["Robin NieDoe"]},{"sn",["NieDoe"]},{"c",["US"]},{"l",["Los Angeles"]},{"st",["CA"]},{"title",["Trainin...

root@pyrochat:~#

Seems a problem in ldap_uids

periferral wrote:
  {mod_vcard_ldap,
   [
    ...
    {ldap_uids, [{"sAMAccountName"}]},

=ERROR REPORT==== 2009-04-17 23:48:30 ===
Error in process <0.1344.0> on node 'ejabberd@pyrochat' with exit value: {function_clause,[{eldap_utils,find_ldap_attrs,[[{"sAMAccountName"}],[{"objectClass",["top","person","organizationalPerson","user"]},{"cn",["Robin NieDoe"]},{"sn",["NieDoe"]},{"c",["US"]},{"l",["Los Angeles"]},{"st",["CA"]},{"title",["Trainin...

The ejabberd Guide says:

Quote:

ldap_uids
...
The value is of the form: [{ldap_uidattr}] or [{ldap_uidattr, ldap_uidattr_format}]

Your option ldap_uids uses the first form, so it seems correct.

However, when looking at the source code, it seems the second form is expected: provide attribute and its format.

Can you try to put

   {ldap_uids, [{"sAMAccountName", "%u"}]},

or similar?

If you try, please report if that second form in the configuration allows to search correctly or not, so the documentation or the code will be fixed.

thanks

I think that fixed it. I have my latest working copy to reflect this

  {mod_vcard_ldap,
   [
    {host, "directory.@HOST@"},
    {ldap_rootdn, "CN=WHOCARES,OU=Users_NonHuman,DC=company,DC=com"},
    {ldap_password, "123456"},
    {ldap_base, "CN=Users,DC=company,DC=com"},
    {ldap_uids, [{"sAMAccountName","%u"}]},
    {ldap_filter, "(&(objectClass=person)(objectClass=user)(objectClass=organizationalPerson))"},
    %% Now we want to define vCard pattern
    {ldap_vcard_map,
     [
      {"NICKNAME", "%s", ["displayName"]},
      {"USERID", "%s", ["sAMAccountName"]},
      {"GIVEN", "%s", ["givenName"]},
      {"FAMILY", "%s", ["sn"]},
      {"FN", "%s", ["displayName"]},
      {"EMAIL", "%s", ["mail"]}]},
    %% Search form
    {ldap_search_fields,
     [{"User ID", "%u"},
      {"First Name", "givenName"},
      {"Last Name", "sn"},
      {"Email", "mail"}]},
    %% vCard fields to be reported
    %% Note that JID is always returned with search results
    {ldap_search_reported,
     [{"Nickname", "NICKNAME"},
      {"Name", "FN"},
      {"User ID", "USERID"},
      {"Email", "EMAIL"}]}
  ]},
Syndicate content