I am tring to get my ejabberd installation working for intranet chat and using Active directory for user authentication.
I have tried multiple things to get this LDAP authentication to work but to no avail.
Using Ejabberd  : 2.1.10
Operating System is : Ubuntu 12.04
Please guide.
My config file is as follows
override_global.
override_local.
override_acls.
{loglevel, 5}.
{hosts, ["localhost"]}.
{listen,
 [
  {5222, ejabberd_c2s, [
                        {access, c2s},
                        {shaper, c2s_shaper},
                        {max_stanza_size, 65536},
                        starttls, {certfile, "/etc/ejabberd/ejabberd.pem"}
                       ]},
  {5269, ejabberd_s2s_in, [
                           {shaper, s2s_shaper},
                           {max_stanza_size, 131072}
                          ]},
  {5280, ejabberd_http, [
                         http_bind,
                         http_poll,
                         web_admin
                        ]}
 ]}.
{max_fsm_queue, 1000}.
{s2s_use_starttls, true}.
{s2s_certfile, "/etc/ejabberd/ejabberd.pem"}.
{auth_method, ldap}.
{ldap_servers, ["a.b.c.d"]}.
{ldap_port, 3268}.
{ldap_uidattr, "uid"}.
{ldap_rootdn, "ldapuser@xyz.com"}.
{ldap_password, "testpassword"}.
{ldap_base, "dc=xyz,dc=com"}.
{ldap_filter, "(memberOf=*)"}.
{shaper, normal, {maxrate, 1000}}.
{shaper, fast, {maxrate, 50000}}.
{acl, admin, {user, "asane", "localhost"}}.
{acl, local, {user_regexp, ""}}.
{access, max_user_sessions, [{10, all}]}.
{access, max_user_offline_messages, [{5000, admin}, {100, all}]}.
{access, local, [{allow, local}]}.
{access, c2s, [{deny, blocked},
               {allow, all}]}.
{access, c2s_shaper, [{none, admin},
                      {normal, all}]}.
{access, s2s_shaper, [{fast, all}]}.
{access, announce, [{allow, admin}]}.
{access, configure, [{allow, admin}]}.
{access, muc_admin, [{allow, admin}]}.
{access, muc, [{allow, all}]}.
{access, register, [{deny, all}]}.
{access, pubsub_createnode, [{allow, all}]}.
{language, "en"}.
{modules,
[
  {mod_adhoc,    []},
  {mod_announce, [{access, announce}]}, % requires mod_adhoc
  {mod_caps,     []},
  {mod_configure,[]}, % requires mod_adhoc
  {mod_admin_extra, []},
  {mod_disco,    []},
  {mod_last,     []},
  {mod_offline,  [{access_max_user_messages, max_user_offline_messages}]},
  {mod_privacy,  []},
  {mod_private,  []},
  {mod_pubsub,   [ {access_createnode, pubsub_createnode}, {plugins, ["default", "pep"]} ]},
  {mod_roster,   []},
  {mod_stats,    []},
  {mod_time,     []},
  {mod_version,  []},
  {mod_vcard_ldap, [
    {matches, infinity},
    {ldap_vcard_map, [
      {"NICKNAME", "%s", ["displayName"]},
      {"FN", "%s", ["displayName"]},
      {"EMAIL", "%s", ["mail"]},
      {"CTRY", "%s", ["co"]},
      {"STREET", "%s", ["streetAddress"]},
      {"REGION", "%s", ["st"]},
      {"PCODE", "%s", ["postalCode"]},
      {"DESC", "%s", ["description"]},
      {"TEL", "%s", ["telephoneNumber"]}
    ]},
    {ldap_search_fields, [
      {"Name", "dsiplayName"},
      {"Family Name", "sn"},
      {"Department", "department"}
    ]},
    {ldap_search_reported, [
      {"Full Name", "displayName"},
      {"Department", "department"},
      {"Phone", "telephoneNumber"}
    ]}
  ]},
  {mod_shared_roster_ldap, [
     {ldap_filter, "(objectClass=organizationalPerson)"},
     {ldap_groupattr, "department"},
     {ldap_groupdesc, "department"},
     {ldap_memberattr, "sAMAccountName"},
     {ldap_userdesc, "displayName"}
  ]}
 ]}.
The log file is showing the following error messages
=INFO REPORT==== 2013-04-19 17:18:03 ===
I(<0.348.0>:ejabberd_listener:281) : (#Port<0.4117>) Accepted connection {{127,0,0,1},48504} -> {{127,0,0,1},5222}
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:ejabberd_receiver:320) : Received XML on stream = "<?xml version='1.0' ?>"
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.352.0>:ejabberd_c2s:1553) : Send XML on stream = [60,63,120,109,108,32,
                                                       118,101,114,115,105,
                                                       111,110,61,39,49,46,48,
                                                       39,63,62,60,115,116,
                                                       114,101,97,109,58,115,
                                                       116,114,101,97,109,32,
                                                       120,109,108,110,115,61,
                                                       39,106,97,98,98,101,
                                                       114,58,99,108,105,101,
                                                       110,116,39,32,120,109,
                                                       108,110,115,58,115,116,
                                                       114,101,97,109,61,39,
                                                       104,116,116,112,58,47,
                                                       47,101,116,104,101,114,
                                                       120,46,106,97,98,98,
                                                       101,114,46,111,114,103,
                                                       47,115,116,114,101,97,
                                                       109,115,39,32,105,100,
                                                       61,39,"3513396203",39,
                                                       32,102,114,111,109,61,
                                                       39,"localhost",39,
                                                       [" version='","1.0",
                                                        "'"],
                                                       [" xml:lang='","en",
                                                        "'"],
                                                       62]
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.352.0>:ejabberd_c2s:1553) : Send XML on stream = <<"PLAIN">>
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:ejabberd_receiver:320) : Received XML on stream = ""
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:shaper:61) : State: {maxrate,1000,0,1366372083651334}, Size=51
M=25.5, I=3.682
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:ejabberd_receiver:320) : Received XML on stream = []
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:shaper:61) : State: {maxrate,1000,992.6814076611647,
                                    1366372083677022}, Size=0
M=0.0, I=-20.148
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:ejabberd_receiver:320) : Received XML on stream = []
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:shaper:61) : State: {maxrate,1000,496.34070383058236,
                                    1366372083677879}, Size=0
M=0.0, I=0.537
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:ejabberd_receiver:320) : Received XML on stream = []
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:shaper:61) : State: {maxrate,1000,248.17035191529118,
                                    1366372083678426}, Size=0
M=0.0, I=4.284
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:ejabberd_receiver:320) : Received XML on stream = ""
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:shaper:61) : State: {maxrate,1000,124.08517595764559,
                                    1366372083682718}, Size=114
M=60.770349772248565, I=42.921
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.352.0>:ejabberd_c2s:1553) : Send XML on stream = [60,63,120,109,108,32,
                                                       118,101,114,115,105,
                                                       111,110,61,39,49,46,48,
                                                       39,63,62,60,115,116,
                                                       114,101,97,109,58,115,
                                                       116,114,101,97,109,32,
                                                       120,109,108,110,115,61,
                                                       39,106,97,98,98,101,
                                                       114,58,99,108,105,101,
                                                       110,116,39,32,120,109,
                                                       108,110,115,58,115,116,
                                                       114,101,97,109,61,39,
                                                       104,116,116,112,58,47,
                                                       47,101,116,104,101,114,
                                                       120,46,106,97,98,98,
                                                       101,114,46,111,114,103,
                                                       47,115,116,114,101,97,
                                                       109,115,39,32,105,100,
                                                       61,39,"1756001203",39,
                                                       32,102,114,111,109,61,
                                                       39,"localhost",39,
                                                       [" version='","1.0",
                                                        "'"],
                                                       [" xml:lang='","en",
                                                        "'"],
                                                       62]
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.352.0>:ejabberd_c2s:1553) : Send XML on stream = <<"PLAIN">>
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:ejabberd_receiver:320) : Received XML on stream = "ADE3OTU1MgBBbnUwbWF1JA=="
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:shaper:61) : State: {maxrate,1000,0,1366372083726273}, Size=187
M=93.5, I=17.927
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.273.0>:eldap:696) : {searchRequest,
                          {'SearchRequest',"dc=xyz,dc=com",wholeSubtree,
                           neverDerefAliases,0,0,false,
                           {'and',
                            [{equalityMatch,
                              {'AttributeValueAssertion',"uid","abcd"}},
                             {present,"memberOf"}]},
                           ["uid"]}}
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.273.0>:eldap:767) : {searchResDone,
                             {'LDAPResult',success,[],[],asn1_NOVALUE}}
=INFO REPORT==== 2013-04-19 17:18:03 ===
I(<0.352.0>:ejabberd_c2s:649) : ({socket_state,tls,{tlssock,#Port<0.4117>,#Port<0.4139>},<0.351.0>}) Failed authentication for abcd@localhost
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.352.0>:ejabberd_c2s:1553) : Send XML on stream = <<"">>
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:ejabberd_receiver:320) : Received XML on stream = ""
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.351.0>:shaper:61) : State: {maxrate,1000,995.390331406428,
                                    1366372083820206}, Size=16
M=15.926583727189877, I=1.004
=INFO REPORT==== 2013-04-19 17:18:03 ===
D(<0.352.0>:ejabberd_c2s:1553) : Send XML on stream = ""