mod_vcard_ldap doesn't work

I installed 15.03 using binary installer on RHEL 6.x, ldap authencation works fine but mod_vcard_ldap doesn't work.

I tested with (XMPP client) psi, login, right click one of the contact, select "user info", click "Retrieve" on the user info dialog box, it shows error as below.

Unable to retrieve information about this contact.
Reason: No VCard available

I had a working 2.1.13 ejabberd setup in another box (installed via yum), both ldap auth and mod_vcard_ldap worked well, the config file of 15.03 setup is nearly same as that old version, the only deffernece is the format, it is changed to yml format now.

here is the mod_vcard_ldap part config in 15.03 version:

  mod_vcard_ldap:
    ldap_vcard_map:
      "NICKNAME": {"%s": ["cn"]}
      "FIRST": {"%s": ["givenName"]}
      "LAST": {"%s": ["sn"]}
      "FN": {"%s": ["displayName"]}
      "EMAIL": {"%s": ["mail"]}
      "ORGNAME": {"%s": ["physicalDeliveryOfficeName"]}
      "ORGUNIT": {"%s": ["department"]}
      "CTRY": {"%s": ["c"]}
      "LOCALITY": {"%s": ["l"]}
      "STREET": {"%s": ["streetAddress"]}
      "REGION": {"%s": ["st"]}
      "PCODE": {"%s": ["postalCode"]}
      "TEL": {"%s": ["telephoneNumber"]}
    ldap_search_fields:
      "User": "%u"
      "Name": "givenName"
      "Family Name": "sn"
      "Email": "mail"
    ldap_serch_reported:
      "Full Name": "FN"
      "Nickname": "NICKNAME"
      "Email": "EMAIL"

May I know how to troubleshoot this issue? what other information do I need to provide?

You should look into ejabberd

You should look into ejabberd log files to look for errors.

Hi,mremond, Thanks! I didn't

Hi,mremond,
Thanks!
I didn't found hint from ejabberd.log, but after I changed "ldap_uids" setting in ldap auth config, this issue is gone.

I was confused with the "ldap_uids" config in the documentation:
https://docs.ejabberd.im/admin/guide/configuration/

Here is the settings in my old config format (not .yml format).
{ldap_uids, [{"sAMAccountName"}]},

I was using this settings in my new .yml config file when I was posting this issue:

ldap_uids:
  - "sAMAccountName"

with the setting, ldap auth did work fine, but as I said "mod_vcard_ldap" failed to work, then I changed settings to below:

ldap_uids:
  "sAMAccountName": "%u"

Now both ldap_auth and mod_vcard_ldap work fine.
I am not sue if this is exactly the root cause, but at least in my box it seems this settings change did the trick.

Syndicate content