ejabberd - Comments for "Ubuntu 10.4 LTS with ejabberd 2.1.2 and shared_roster_ldap" https://www.ejabberd.im/node/5067 en Hello, i did now: https://www.ejabberd.im/node/5067#comment-58086 <p>Hello,</p> <p>i did now:</p> <p> {mod_shared_roster_ldap, [<br /> {ldap_base,"ou=People,dc=cypres-it,dc=com"},<br /> {ldap_filter, ""},<br /> {ldap_rfilter, "(&amp;(objectClass=posixAccount)(postalCode=D-44135))"},<br /> {ldap_groupattr,"o"},<br /> {ldap_gfilter, "(&amp;(objectClass=posixAccount)((postalCode=%g))"},<br /> {ldap_groupdesc,"o"},<br /> {ldap_memberattr,"uid"},<br /> {ldap_memberattr_format, "%u"},<br /> {ldap_ufilter, "(uid=%u)"},<br /> {ldap_userdesc, "cn"},<br /> {ldap_useruid, "mail"}</p> <p>But this just shows me some search results in debug mode</p> <p>=INFO REPORT==== 2011-11-28 14:25:17 ===<br /> D(&lt;0.375.0&gt;:eldap:695) : {searchResEntry,<br /> {'SearchResultEntry',<br /> "cn=Bernhard XXXXX,ou=People,dc=cypres-it,dc=com",<br /> [{'PartialAttributeList_SEQOF',"o",<br /> ["Cyprès GmbH"]}]}}</p> <p>but nothing get pushed to my jabber acc.</p> <p>I am using ubuntu 10.4 LTS and ejabber 2.1.2 - are you sure thats working with this shared_roster_ldap ?</p> Mon, 28 Nov 2011 16:00:16 +0000 MDCYP comment 58086 at https://www.ejabberd.im Then send me your logs to https://www.ejabberd.im/node/5067#comment-58076 <p>Then send me your logs to <noindex><a href="mailto:mikekaganski@hotmail.com" rel="nofollow" >mikekaganski@hotmail.com</a></noindex>. Remember to strip sensitive information before send.</p> Thu, 24 Nov 2011 20:57:24 +0000 mikekaganski comment 58076 at https://www.ejabberd.im Hello, thanks again for your https://www.ejabberd.im/node/5067#comment-58075 <p>Hello,</p> <p>thanks again for your help.<br /> I am still trying to get anything to work.. at the moment i added your lines in my config and i dont see any group ppushed to my jabber account yet.<br /> I am trying to run in debug=5 and live mode to see if he does any searches.. but i fail.</p> <p>Can you tell me a pretty simple config to test if ANYTHING will be pushed to my psi client - my problem is.. i need first to be sure that this module is working :)</p> Thu, 24 Nov 2011 15:54:58 +0000 MDCYP comment 58075 at https://www.ejabberd.im I replied 8 hours ago, but https://www.ejabberd.im/node/5067#comment-58072 <p>I replied 8 hours ago, but the answer is being moderated again. This moderation system makes the forum almost useless.</p> <p>Well, in addition to the previous (still unpublished) reply, I must note:<br /> 1. The configuration I posted may contain errors, but I don't remember exactly where, and I cannot fix it until it is here (and when I will try to fix it after approval, it will go to moderation again!). One (possible) fix is needed in objectClass value, and two others are just to optimize the work a little.<br /> 2. In the best optimized case, the already installed module will need [2+user_number] LDAP queries and [1 + 2*user_number] objects returned by LDAP initially (when the cache is first initialized), and <strong>at least</strong> 1 LDAP query and 1 object returned afterwards (when the cache is still valid) each time users needs their roster or subscription information. The new module will initially need [2+user_number] queries and [2+user_number] returned objects (which may be a considerable gain in case of many users), and no more queries will be needed in the cache lifetime.</p> Wed, 23 Nov 2011 22:09:13 +0000 mikekaganski comment 58072 at https://www.ejabberd.im Yes, in this case this will https://www.ejabberd.im/node/5067#comment-58071 <p>Yes, in this case this will most likely be OK:</p> <div class="codeblock"><code>{mod_shared_roster_ldap, [<br /> {ldap_base,&quot;ou=People,dc=cypres-it,dc=com&quot;},<br /> {ldap_filter, &quot;&quot;}, % don&#039;t do harmful additions to filters<br /> {ldap_rfilter, &quot;(&amp;(objectClass=organizationalUnit)(o=Company))&quot;},<br /> % maybe you can omit objectClass, or use some other value to filter your users.<br /> % This will select all users as objects that define your groups.<br /> {ldap_groupattr,&quot;o&quot;}, % This will extract the &quot;o&quot; attribute from your users,<br /> % and the resulting values list will become the list of your groups<br /> % (presumably only one distinct value &quot;Company&quot;)<br /> {ldap_gfilter, &quot;(&amp;(objectClass=organizationalUnit)(o=%g))&quot;},<br /> % this filter will effectively bring the same objects as ldap_rfilter did<br /> {ldap_groupdesc,&quot;o&quot;}, % The name of your group will be &quot;Company&quot;<br /> {ldap_memberattr,&quot;mail&quot;},<br /> {ldap_memberattr_format, &quot;%u@cypres-it.com&quot;},<br /> {ldap_ufilter, &quot;(mail=%u@cypres-it.com)&quot;},<br /> {ldap_userdesc, &quot;cn&quot;},<br /> {ldap_useruid, &quot;mail&quot;} % this is possibly the problem. But you need to check this first.<br />]},</code></div> Wed, 23 Nov 2011 12:53:11 +0000 mikekaganski comment 58071 at https://www.ejabberd.im Thank you for your help. I am https://www.ejabberd.im/node/5067#comment-58070 <p>Thank you for your help.</p> <p>I am using openldap and i think all employees have o=Company in common.</p> <p>Can i then use the module i installed?</p> Wed, 23 Nov 2011 12:31:27 +0000 MDCYP comment 58070 at https://www.ejabberd.im So you say that you need one https://www.ejabberd.im/node/5067#comment-58064 <p>So you say that you need one shared group with all users of that OU? And those users don't have anything in common, except this OU (I mean no common LDAP group, no common attribute)?<br /> Assuming that, and also guessing that you use AD (you didn't specify that), I must say that the module version that you use is unable to do what you want.<br /> You need to get a modified version from <noindex><a href="https://support.process-one.net/browse/EJAB-1480" rel="nofollow" >EJAB-1480</a></noindex> (you will need version 2.0.6 from 26/Aug/11).</p> <p>Then you will need to have a look at the configuration options listed there. They have been changed a lot.</p> <p>Your config will look like this:</p> <div class="codeblock"><code>{mod_shared_roster_ldap, [<br /> {ldap_base,&quot;dc=xxx-it,dc=com&quot;},<br /> {ldap_rfilter, &quot;(&amp;(objectClass=organizationalUnit)(ou=People))&quot;}, % Here you get the OU objects that represent your roster groups; in your case it&#039;s only one object<br /> {ldap_groupattr, &quot;objectGUID&quot;}, % This is the attribute of these objects that uniquelly distinguishes each one of them from others<br /> {ldap_gfilter, &quot;(objectGUID=%g)&quot;}, % This will select your roster groups one by one - in your case, only once :)<br /> {ldap_groupdesc, &quot;ou&quot;}, % This will be the display name of the roster group<br /> {ldap_member_selection_mode, group_children}, % You will simply select LDAP subobjects of your OU<br /> {ldap_useruid, &quot;mail&quot;},<br /> {ldap_useruid_format, &quot;%u@xxx-it.com&quot;}, % Another assumption - I suppose you have all your users&#039; mails to belong to one &quot;xxx-it.com&quot; domain. If not, you will need ldap_useruid_format_re instead<br /> %{ldap_useruid_format_re, &quot;^(.+)@.*$&quot;},<br /> {ldap_userdesc, cn} % Not really necessary here - this is the default. I put it only to clarify things<br /> ]}</code></div> <p>Note that you cannot define arbitrary domain to put after "@" - this module will authomatically put the ejabberd domain here.<br /> Note also that the module version 2.0.6 has a known compatibility problem with erlang older than R13A. If your erlang is older, then you may either upgrade erlang, or consider upgrading ejabberd to v.2.1.9+ to be able to use the latest module version that has this problem fixed.</p> Mon, 21 Nov 2011 23:33:00 +0000 mikekaganski comment 58064 at https://www.ejabberd.im Hello !! i have 2.1.2 and https://www.ejabberd.im/node/5067#comment-58054 <p>Hello !!</p> <p>i have 2.1.2 and installed: ejabberd-mod-shared-roster-ldap_0.5.3-1ubuntu1~lucid1_all.deb</p> <p>and my LDAP schema is: dc=xxx-it, dc=com and then ou=People and there cn=Max Mustermann (and all the others as other cn´s) and in a users field i need the mail attribut and add 'office' after the @ to get the jabber account name</p> Mon, 21 Nov 2011 13:15:56 +0000 MDCYP comment 58054 at https://www.ejabberd.im Hello MDCYP, you haven't https://www.ejabberd.im/node/5067#comment-58048 <p>Hello MDCYP,</p> <p>you haven't specified the mandatory parameter ldap_rfilter. Besides, your other two filters are incorrect. You didn't tell which version of the module do you use (ejabberd 2.1.2 didn't include this module, it was bundled since 2.1.6), and you didn't describe your LDAP schema and your desired result. Please provide this info if you need further help.</p> Thu, 17 Nov 2011 22:04:01 +0000 mikekaganski comment 58048 at https://www.ejabberd.im