ejabberd - Comments for "searching for users with mod_vcard_ldap" https://www.ejabberd.im/node/3481 en thanks https://www.ejabberd.im/node/3481#comment-54184 <p>I think that fixed it. I have my latest working copy to reflect this</p> <pre> {mod_vcard_ldap, [ {host, "directory.@HOST@"}, {ldap_rootdn, "CN=WHOCARES,OU=Users_NonHuman,DC=company,DC=com"}, {ldap_password, "123456"}, {ldap_base, "CN=Users,DC=company,DC=com"}, {ldap_uids, [{"sAMAccountName","%u"}]}, {ldap_filter, "(&amp;(objectClass=person)(objectClass=user)(objectClass=organizationalPerson))"}, %% Now we want to define vCard pattern {ldap_vcard_map, [ {"NICKNAME", "%s", ["displayName"]}, {"USERID", "%s", ["sAMAccountName"]}, {"GIVEN", "%s", ["givenName"]}, {"FAMILY", "%s", ["sn"]}, {"FN", "%s", ["displayName"]}, {"EMAIL", "%s", ["mail"]}]}, %% Search form {ldap_search_fields, [{"User ID", "%u"}, {"First Name", "givenName"}, {"Last Name", "sn"}, {"Email", "mail"}]}, %% vCard fields to be reported %% Note that JID is always returned with search results {ldap_search_reported, [{"Nickname", "NICKNAME"}, {"Name", "FN"}, {"User ID", "USERID"}, {"Email", "EMAIL"}]} ]}, </pre> Sun, 19 Apr 2009 22:07:00 +0000 periferral comment 54184 at https://www.ejabberd.im Seems a problem in ldap_uids https://www.ejabberd.im/node/3481#comment-54183 <div class="quote-msg"> <div class="quote-author"><em>periferral</em> wrote:</div> <pre> {mod_vcard_ldap, [ ... {ldap_uids, [{"sAMAccountName"}]}, </pre><p> =ERROR REPORT==== 2009-04-17 23:48:30 ===<br /> Error in process &lt;0.1344.0&gt; on node 'ejabberd@pyrochat' with exit value: {function_clause,[{eldap_utils,find_ldap_attrs,[[{"sAMAccountName"}],[{"objectClass",["top","person","organizationalPerson","user"]},{"cn",["Robin NieDoe"]},{"sn",["NieDoe"]},{"c",["US"]},{"l",["Los Angeles"]},{"st",["CA"]},{"title",["Trainin... </p></div> <p>The ejabberd Guide says:</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>ldap_uids<br /> ...<br /> The value is of the form: [{ldap_uidattr}] or [{ldap_uidattr, ldap_uidattr_format}] </p></div> <p>Your option ldap_uids uses the first form, so it seems correct.</p> <p>However, when looking at the source code, it seems the second form is expected: provide attribute and its format.</p> <p>Can you try to put</p> <pre> {ldap_uids, [{"sAMAccountName", "%u"}]}, </pre><p>or similar?</p> <p>If you try, please report if that second form in the configuration allows to search correctly or not, so the documentation or the code will be fixed.</p> Sun, 19 Apr 2009 18:23:09 +0000 mfoss comment 54183 at https://www.ejabberd.im