How can I configure mod_vcard_ldap correctly?

Hello,

Is there any documentation on parameters that mod_vcard_ldap accepts?
I've compiled ejabberd from svn (revision 434) yesterday.
I can authenticate through LDAP database on localhost, it works fine.
Nevertheless mod_vcard_ldap does not function correctly, the error message in log is the same to
http://www.ejabberd.im/node/401
(actually my post is duplicate to that one :) ).

mod_vcard_ldap is said to be fixed in the latest SVN revision, what do I need to pass to it in order to get it working?
The current configuration is

{mod_vcard_ldap, [{host, "localhost"}]}

Error message that is logged during attempt to see user details is:

=ERROR REPORT==== 2005-11-17 12:16:18 ===
E(<0.280.0>:gen_iq_handler:67): {noproc,
                                    {gen_fsm,
                                        sync_send_event,
                                        [eldap_mod_vcard_ldap,
                                         {search,
                                             {eldap_search,
                                                 wholeSubtree,
                                                 undefined,
                                                 {equalityMatch,
                                                     {'AttributeValueAssertion',
                                                         undefined,
                                                         "user1"}},
                                                 [],
                                                 false,
                                                 0}}]}}

My assumption is that there's something wrong/misconfigured in

{eldap_search, wholeSubtree, undefined, 
    {equalityMatch,{'AttributeValueAssertion',undefined,"user1"}},
    [],false,0}

too many 'undefined' parameters there :)

Comment from Aleksey

I asked Aleksey and he answered: 'it seems connection to ldap server dies, probably there should be some error reports in logs'.

Most likely it is not :)

This is a test installation without any other resource-consuming processes. LDAP server is located on localhost, it is stable and we can do ldapsearch on it at any time. Moreover user can log in to ejabberd using ldap authentication at any time without any troubles and with his/her roster fetched through mod_shared_roster from the same LDAP database.

I can quote any part of ejabberd.log here though there are no messages about connection is lost. Search for vcard always returns 1 result without any positive impact on the client side :((

Does Alexey have the working config himself?

an update about bodomizer's mod_vcard_ldap experience

I've looked through that installation, added few INFO_MSG and found that mod_vcard_ldap *does* work, but wants "displayname" ldap attribute instead of "cn".

For these, who might face the same issue in feature:
ldap_lca_to_vcard/3 function in mod_vcard_ldap.erl file maps ldap attribs such as {uid, displayname, telephonenumber, description} to {NICKNAME, FN, TEL/NUMBER, DESC} vCard tags.

We still were not able to make Miranda IM show contacts in "Lastname Firstname" notation with shared roster enabled though... :(
Related bug: #174

{mod_vcard_ldap, [{host,

{mod_vcard_ldap, [{host, "localhost"}]}

Why did you add the option 'host'?

It's optional, in your case it doesn't have any effect, and, in fact, it's incorrect: it should be "vjud.localhost", or "users.localhost", or "vjud.myserver.com", ... not simply "localhost".

The main answer is "I did it

The main answer is "I did so because I have no documentation that says not to do so".

Well, my root LDAP server contains all the users' information under ou=People and is accessible through ldap://localhost, why not?
Should I assign a pseudo-name vjud.locahost to it also?
Will it guarantee that mod_vcard_ldap will start working?

'host' is a common option

'host' is a common option for ejabberd modules. It is described in the ejabberd guide (the official documentation).

The modules option 'host' sets the name for the service as listed on the Jabber Discovery. This option is not specific to LDAP, and has nothing to do with LDAP. It is available for the standard mod_vcard too, and a lot more modules.

I suggest you remove it from ejabberd.cfg until you understand what it does and you really want to use it.

Back to mod_vcard_ldap :)

'host' is a common option for ejabberd modules

Ok, it's my fault to say it's not documented, sorry. I know that it's common for other modules too.
Anyways the main goal of this topic is to find whether mod_vcard_ldap is working at all in some configuration. Does it?
Please see the extract from openldap server log in other branch of this topic. I suppose that connection to ldap is successful but mod_vcard_ldap just doesn't understand the output correctly...

Look. Here's what I see in

Look. Here's what I see in LDAP server log on each try of getting user details:
===
Nov 21 14:07:37 vm_alm24 slapd[32647]: conn=0 op=3 SRCH base="ou=People,dc=moscow,dc=myorg,dc=com" scope=2 filter="(uid=iivanov)"
Nov 21 14:07:37 vm_alm24 slapd[32647]: conn=0 op=3 ENTRY dn="uid=iivanov,ou=People,dc=moscow,dc=myorg,dc=com"
Nov 21 14:07:37 vm_alm24 slapd[32647]: conn=0 op=3 SEARCH RESULT tag=101 err=0 nentries=1 text=
===
I understand these three lines as:
1) ejabberd performs search in database;
2) search is successful, the entry is shown;
3) entry is passed to ejabberd as a search result.
Am I right?

Syndicate content