ejabberd - Comments for "Buddy list downloaded as JIDs instead of proper names" https://www.ejabberd.im/node/3852 en Just wanted to note, there is https://www.ejabberd.im/node/3852#comment-59289 <p>Just wanted to note, there is an alternative solution to this issue rather than using mod_shared_roster_ldap (I can't use it here, since it would result in easily a few thousand people on every user's shared roster). I wrote up a simple module that hooks the roster saving process and injects a name from LDAP if the alias is blank. You can find it at <noindex><a href="https://gist.github.com/4212756" title="https://gist.github.com/4212756" rel="nofollow" >https://gist.github.com/4212756</a></noindex> -- I am commenting on this very old thread because it's one of the easiest ones to find when google searching for this problem!</p> Wed, 05 Dec 2012 05:59:21 +0000 arekinath comment 59289 at https://www.ejabberd.im I also had JID displayName issue, turned out to be mis-cfg'ed https://www.ejabberd.im/node/3852#comment-56350 <p>I had the exact same issue that <strong>andreasd</strong> described, where my Debian apt-get built ejabberd v2.0.1 server which auths against LDAP with mod_vcard_ldap &amp; mod_shared_roster_ldap enabled would only download the JIDs as the displayName in the shared roster instead of the full names - despite the fact that when I turned on query tracing in slapd I could clearly see that the "displayName" field was being retrieved!!</p> <p>My <strong>eureka!</strong> moment came when I was staring blindly at a configuration snippet elsewhere on this site: <a href="http://www.ejabberd.im/mod_shared_roster_ldap" title="http://www.ejabberd.im/mod_shared_roster_ldap">http://www.ejabberd.im/mod_shared_roster_ldap</a></p> <p>My Problem: I didn't define a value for "ldap_useruid", I only defined "ldap_userdesc". After getting it working and looking at the code I realized why, ldap_useruid defaults to "cn" but in the case of our LDAP tree the username field is stored in "uid".</p> <p>Here's my working (and cleansed) configuration, which I am sharing in the hopes that it might also be helpful to others suffering from this same problem:</p> <blockquote><p> %% mod_shared_roster_ldap config starts here</p> <p> {mod_shared_roster_ldap, [<br /> %% Base filter for lookups %% ou=JabberGroups<br /> {ldap_base, "dc=company,dc=com"},<br /> %% Group Attribute NFO<br /> {ldap_groupattr, "cn"},<br /> {ldap_groupdesc, "description"},<br /> {ldap_memberattr, "member"},<br /> {ldap_memberattr_format, "uid=%u,ou=Employees,dc=company,dc=com"},<br /> %% User Attribute NFO<br /> {ldap_useruid, "uid"},<br /> {ldap_userdesc, "displayName"},<br /> %% Roster Filter for determining group name list<br /> {ldap_rfilter, "(objectClass=groupOfNames)"},<br /> {ldap_gfilter, "(&amp;(objectClass=groupOfNames)(cn=%g))"},<br /> {ldap_ufilter, "(&amp;(employeeType=*)(uid=%u))"},<br /> {ldap_filter, ""}</p> <p> %% END mod_shared_roster_ldap<br /> ]} </p></blockquote> <p>Also note that I disabled (commented out) mod_vcard &amp; mod_shared_roster - but left mod_roster enabled.</p> <p>I hope that this is helpful to others - because I also found this problem very frustrating as everything appeared to be working properly, but the problem in reality turned out to be a problem of omitting one very critical configuration parameter.</p> <p>Good Luck,</p> <p>-David.</p> Tue, 06 Jul 2010 16:59:38 +0000 dscticoon comment 56350 at https://www.ejabberd.im Still trying https://www.ejabberd.im/node/3852#comment-55448 <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>When I relogin, I get again only the other contact, with its correct nickname, similarly to step 2 that I described.</p></div> <p>[/quote]</p> <p>I've tried to vary some variables in the group info but keep on hitting the same results. Another thing that is weird is that if I create a group with only me as member, and change the members to @all@, I recieve 58 messages pertaining to this memory issue I mentioned earlier:</p> <p>[15:25:38] (ejabberd@localhost) The process &lt;0.28765.0&gt; is consuming too much memory:<br /> [{old_heap_block_size,1682835},<br /> {heap_block_size,317811},<br /> {mbuf_size,0},<br /> {stack_size,145},<br /> {old_heap_size,930889},<br /> {heap_size,1805}]<br /> [{current_function,{io_lib,printable_list,1}},<br /> {initial_call,{proc_lib,init_p,5}},<br /> {message_queue_len,1},<br /> {links,[&lt;0.0.0&gt;,&lt;0.28788.0&gt;,#Port&lt;0.17732&gt;]},<br /> {dictionary,[{'$ancestors',[&lt;0.28762.0&gt;]},<br /> {'$initial_call',{gen,init_it,<br /> [gen_event,&lt;0.28762.0&gt;,&lt;0.28762.0&gt;,<br /> {local,error_logger},<br /> [],[],[]]}}]},<br /> {heap_size,317811},<br /> {stack_size,164}]</p> <p>I am including my modules config this time if it's of any help. Is anything wrong with the way we load mod_vcard_ldap?</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>{modules,<br /> [<br /> {mod_adhoc, []},<br /> {mod_announce, [{access, announce}]}, % requires mod_adhoc<br /> {mod_caps, []},<br /> {mod_configure,[]}, % requires mod_adhoc<br /> {mod_disco, []},</p> <p> {mod_http_bind,[]},<br /> {mod_irc, []},<br /> {mod_last, []},<br /> {mod_muc, [<br /> {access, muc},<br /> {access_create, muc},<br /> {access_persistent, muc_admin},<br /> {access_admin, muc_admin},<br /> {logging, true},<br /> {anonymous, false}<br /> ]},<br /> {mod_muc_log, [<br /> {dirtype, subdirs},<br /> {file_format, plaintext},<br /> {outdir, "/opt/ejabberd-2.1.2/logs/muclogs"},<br /> {timezone, local}<br /> ]},<br /> {mod_offline, []},<br /> {mod_privacy, []},<br /> {mod_private, []},<br /> {mod_pubsub, [ % requires mod_caps<br /> {access_createnode, pubsub_createnode},<br /> {plugins, ["default", "pep"]}<br /> ]},<br /> {mod_register, [<br /> {welcome_message, {"Welcome!",<br /> "Welcome to this Jabber server."}},<br /> {access, register}<br /> ]},<br /> {mod_roster, []},<br /> {mod_shared_roster,[]},<br /> {mod_time, []},<br /> {mod_vcard, [{search, true},<br /> {matches, infinity},<br /> {allow_return_all, true}]},<br /> {mod_vcard_ldap,<br /> [<br /> {ldap_rootdn, "cn=admin,dc=mycompany,dc=com"},<br /> {ldap_password, "password"},<br /> {ldap_base, "ou=people,dc=mycompany,dc=com"},<br /> {ldap_uids, [{"cn", "%u"}]},<br /> {ldap_vcard_map, [<br /> {"NICKNAME", "%s %s", ["givenName", "sn"]},<br /> {"GIVEN", "%s", ["givenName"]},<br /> {"FAMILY", "%s", ["sn"]},<br /> {"EMAIL", "%s", ["mail"]},<br /> {"FN", "%s %s", ["givenName", "sn"]}]},<br /> {ldap_search_fields, [<br /> {"User", "%u"},<br /> {"Name", "givenName"},<br /> {"Family Name", "sn"}]},<br /> {ldap_search_reported, [<br /> {"Full Name", "FN"},<br /> {"Nickname", "NICKNAME"}]}<br /> ]},<br /> {mod_version, []}<br /> ]}. </p></div> Thu, 25 Mar 2010 14:27:13 +0000 andreasd comment 55448 at https://www.ejabberd.im Close now https://www.ejabberd.im/node/3852#comment-55428 <div class="quote-msg"> <div class="quote-author"><em>d.k.brazz</em> wrote:</div> <p>If you use LDAP, then you might be interested in mod_shared_roster_ldap https://alioth.debian.org/projects/ejabberd-msrl/</p></div> <p>Hi D.K.Brazz</p> <p>Thanks for the tip. I've tried making this module work and gotten pretty far, but cannot get the JIDs to resolve to names properly.</p> <p>Here's how it looks in my ejabberd.cfg:</p> <p> {mod_shared_roster_ldap,[<br /> {ldap_base, "dc=mycompany,dc=com"},<br /> {ldap_rfilter, "(objectClass=posixGroup)"},<br /> {ldap_filter, ""},<br /> {ldap_gfilter, "(&amp;(objectClass=posixGroup)(cn=all-users))"},<br /> {ldap_memberattr, "memberUid"},<br /> {ldap_ufilter, "(objectClass=inetOrgPerson)"},<br /> {ldap_userdesc, "cn"}</p> <p>Now, no matter what I put in the ldap_userdesc field, it still only downloads the JIDS (the uid from ldap). I would rather it displayed the cn ldap value which stores the users full name.</p> <p>Any idea why it does this?</p> <p>I also find that connecting now takes about 4-5 seconds longer than before. We have around 130 names in our ldap. How can I fix this?</p> <p>Thanks for your assistance.</p> Thu, 18 Mar 2010 15:44:49 +0000 andreasd comment 55428 at https://www.ejabberd.im Try mod_shared_roster_ldap https://www.ejabberd.im/node/3852#comment-55373 <p>If you use LDAP, then you might be interested in mod_shared_roster_ldap <noindex><a href="https://alioth.debian.org/projects/ejabberd-msrl/" title="https://alioth.debian.org/projects/ejabberd-msrl/" rel="nofollow" >https://alioth.debian.org/projects/ejabberd-msrl/</a></noindex><br /> (here is documetation - <noindex><a href="https://alioth.debian.org/docman/view.php/100433/4096/msrl.html" title="https://alioth.debian.org/docman/view.php/100433/4096/msrl.html" rel="nofollow" >https://alioth.debian.org/docman/view.php/100433/4096/msrl.html</a></noindex>)<br /> This module provides more flexible configuration of the shared roster then mod_shared_roster</p> <p>Take a look at this option:</p> <div class="codeblock"><code>ldap_userdesc<br />&nbsp;&nbsp;&nbsp; The name of the attribute which holds the human-readable user name. Defaults to cn.</code></div> <p>PS: This module has performance problems when a large number of users (greater then 200), but I can provide patches which allow to increase performance approximately twice.</p> Sun, 07 Mar 2010 20:10:23 +0000 d.k.brazz comment 55373 at https://www.ejabberd.im You only need to make step 2 https://www.ejabberd.im/node/3852#comment-55361 <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>1. In the web admin console, create 2 groups. "MyFirstGroup" and "MySecondGroup".<br /> 2. In "MySecondGroup" set the name to "Group2", members to @all@ and displayed groups to "MySecondGroup". </p></div> <p>With step 2, all host users are members of the group, and all members get displayed the group itself. This means that all host users get all the host users (everybody in the vhost sees everybody else in the vhost).</p> <p>In my small ejabberd 2.1.2 with LDAP authentication, with 2 users in the LDAP, using Tkabber, it works as I explain. And the contact is shown with the nickname he set in his vcard.</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>3. In "MyFirstGroup", set the displayed groups to "MySecondGroup".<br /> 4. Now log on with a user to the server. He will have a blank roster. </p></div> <p>After doing step 3, in step 4 I still see the other LDAP user as a contact, in the roster, when I login with a user.</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>5. In "MyFirstGroup", add this user to "members".<br /> 6. As soon as you press the Apply ("Send?) button, the users list should populate with the contents of the ldap. Great! Unfortunately, not with their names, but with JIDs. </p></div> <p>After doing step 5, in step 6 I immediately get myself in the roster. But strangely both contacts are shown with JIDs, not nicknames.</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>7. Try log off and back in with the user. The shared roster that was just downloaded is now missing! </p></div> <p>When I relogin, I get again only the other contact, with its correct nickname, similarly to step 2 that I described.</p> Fri, 05 Mar 2010 13:37:56 +0000 mfoss comment 55361 at https://www.ejabberd.im Try this https://www.ejabberd.im/node/3852#comment-55353 <p>With the risk of being labeled a spammer, I wanted to share a step by step reproduction of as far as I have gotten with this new patch.</p> <p>This is using Ejabberd 2.1.2 and an LDAP server for authentication. Our LDAP server has 135 users. Do not use Pandion to test this (pandion tends to add shared roster members autmatically to the contact group on the server (not good)), try a client like Psi.</p> <p>1. In the web admin console, create 2 groups. "MyFirstGroup" and "MySecondGroup".<br /> 2. In "MySecondGroup" set the name to "Group2", members to @all@ and displayed groups to "MySecondGroup".<br /> 3. In "MyFirstGroup", set the displayed groups to "MySecondGroup".<br /> 4. Now log on with a user to the server. He will have a blank roster.<br /> 5. In "MyFirstGroup", add this user to "members".<br /> 6. As soon as you press the Apply ("Send?) button, the users list should populate with the contents of the ldap. Great! Unfortunately, not with their names, but with JIDs.<br /> 7. Try log off and back in with the user. The shared roster that was just downloaded is now missing!</p> <p>Any input would be appreciated. Is our LDAP too big for shared roster?</p> Tue, 02 Mar 2010 16:21:50 +0000 andreasd comment 55353 at https://www.ejabberd.im No luck https://www.ejabberd.im/node/3852#comment-55350 <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>In "Displayed groups" put the group id you used when creating the group, not its "Name". The field labels are misleading, will be fixed in next release.</p></div> <p>Hi badlop</p> <p>The name of the group I created is also MyCompany, same as the "name" and what I put in "groups". So no luck there.</p> <p>Has anyone reported success with this patch and using the @all@ variable? Note that @all@ worked with the previous mod_shared_roster.beam, but not this new patched one.</p> Mon, 01 Mar 2010 13:24:22 +0000 andreasd comment 55350 at https://www.ejabberd.im Nogo https://www.ejabberd.im/node/3852#comment-55349 <p>&lt; edited &gt;</p> Mon, 01 Mar 2010 13:23:00 +0000 andreasd comment 55349 at https://www.ejabberd.im Use the group id https://www.ejabberd.im/node/3852#comment-55346 <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>Name: MyCompany<br /> Description: All users in my company<br /> Members: @all@<br /> Displayed groups: MyCompany</p> <p>This yields an empty contact list.</p> <p>However if I put some names into the members field they resolve eachother and show up in the contact list.</p></div> <p>In "Displayed groups" put the group id you used when creating the group, not its "Name". The field labels are misleading, will be fixed in next release.</p> Mon, 01 Mar 2010 10:26:47 +0000 mfoss comment 55346 at https://www.ejabberd.im Work goes on https://www.ejabberd.im/node/3852#comment-55343 <p>I've made some progress with this. The patch does work but not when using the @all@ group in the members field. I can get it to work with nicely resolved names if I specify each user individually.</p> <p>My group looks like this in the web gui:</p> <p>Name: MyCompany<br /> Description: All users in my company<br /> Members: @all@<br /> Displayed groups: MyCompany</p> <p>This yields an empty contact list.</p> <p>However if I put some names into the members field they resolve eachother and show up in the contact list.</p> Thu, 25 Feb 2010 15:05:36 +0000 andreasd comment 55343 at https://www.ejabberd.im Hi https://www.ejabberd.im/node/3852#comment-55337 <p>Hello Badlop</p> <p>Thanks for taking an interest in my problem. Sorry for taking so long to get back to you.</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>Probably when you click in "Update info", the client requests the contact's vCard, and puts the nickname or the full name as the roster item name.</p></div> <p>Correct.</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>You didn't mention how you get hundreds of contacts in each user's roster. I imagine you use mod_shared_roster with @all@. Also, you didn't mention if you are using mod_vcard, mod_vcard_odbc or mod_vcard_ldap.</p></div> <p>Yes we use mod_vcard_ldap and @all@ in a shared roster. Our ldap server has around 120-150 users.</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>ejabberd 2.1.2 doesn't yet support automatic get from vcard. But there's a ticket, with a patch available: <noindex><a href="https://support.process-one.net/browse/EJAB-114" rel="nofollow" >Shared roster should use user vcard nickname when available</a></noindex>. It would be nice if somebody else can test also the patch.</p> <p>Can you please try the patch, and comment here if it works correctly? If so, please comment also what mod_vcard* are you using.</p></div> <p>I tried this patch but am not having much luck. In my testing environment I cannot even create a proper shared roster with @all@ without recieving the following error:</p> <p>The process &lt;0.9280.0&gt; is consuming too much memory:<br /> [{old_heap_block_size,832040},<br /> {heap_block_size,196418},<br /> {mbuf_size,0},<br /> {stack_size,62},<br /> {old_heap_size,198769},<br /> {heap_size,69620}]<br /> [{current_function,{eldap,'-polish/3-fun-0-',1}},<br /> {initial_call,{proc_lib,init_p,5}},<br /> {message_queue_len,2},<br /> {links,[&lt;0.9248.0&gt;,&lt;0.9279.0&gt;,#Port&lt;0.8602&gt;]},<br /> {dictionary,[{'$ancestors',['ejabberd_auth_ldap_mymachine.com',<br /> ejabberd_sup,&lt;0.9036.0&gt;]},<br /> {'$initial_call',{gen,init_it,<br /> [gen_fsm,&lt;0.9279.0&gt;,&lt;0.9279.0&gt;,<br /> {local,'eldap_#Ref&lt;0.0.0.234260&gt;'},<br /> eldap,<br /> {["ldap.mydomain.net"],<br /> 389,"cn=administrator,dc=mydomain,dc=com",<br /> "password",undefined},<br /> []]}}]},<br /> {heap_size,196418},<br /> {stack_size,42}]</p> <p>I have found a work around though. If I create a shared roster with myself as member pointing in the "group" field to another shared roster with @all@ it works. But the names etc are not resolved and I keep getting these errors.</p> Wed, 24 Feb 2010 10:59:56 +0000 andreasd comment 55337 at https://www.ejabberd.im Try this patch, and comment if it looks good https://www.ejabberd.im/node/3852#comment-55254 <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>When connecting as a user with Pidgin, Pandeon or any other XMPP client we've tried, the buddy list is downloaded with JIDs, usernames, instead of the users proper name, the full name.</p> <p>A work around is that the user right clicks and clicks the "Update info" option. Then the proper name is suddenly displayed.</p></div> <p>Probably when you click in "Update info", the client requests the contact's vCard, and puts the nickname or the full name as the roster item name.</p> <p>You didn't mention how you get hundreds of contacts in each user's roster. I imagine you use mod_shared_roster with @all@. Also, you didn't mention if you are using mod_vcard, mod_vcard_odbc or mod_vcard_ldap.</p> <p>ejabberd 2.1.2 doesn't yet support automatic get from vcard. But there's a ticket, with a patch available: <noindex><a href="https://support.process-one.net/browse/EJAB-114" rel="nofollow" >Shared roster should use user vcard nickname when available</a></noindex>. It would be nice if somebody else can test also the patch.</p> <p>Can you please try the patch, and comment here if it works correctly? If so, please comment also what mod_vcard* are you using.</p> <p>If you installed ejabberd 2.1.2 with a binary installer, you can get the patched and compiled file here: <noindex><a href="http://tkabber.jabber.ru/files/badlop/mod_shared_roster.beam" title="http://tkabber.jabber.ru/files/badlop/mod_shared_roster.beam" rel="nofollow" >http://tkabber.jabber.ru/files/badlop/mod_shared_roster.beam</a></noindex></p> Tue, 02 Feb 2010 21:53:16 +0000 mfoss comment 55254 at https://www.ejabberd.im