Ejabberd two Windows Domains. Search with vCard and Ldap_roster for two domains"

Sorry for my bad English, but I'll try to ask some questions.

I have ejabberd server
I have LDAP-authorization on two Windows domains

Now I need two things
1) LDAP_Roster for two domains. I want that user from one domain can see users from other domain in roster.
2) Search by LDAP_vcard in two domains. I want that user from one domain can search users from other domain.

Now LDAP_Roster works correctly on every domain. So when user from domain1 connect to server, he see roster with users only from domain1. When user from domain2 connect to server, he see roster with users only from domain2.
I want that every user see roster with users from domain1 and domain2.

LDAP_vcard doesn't work at all. If I call LDAP_vcard in {host_config .. } client can see search form. But searching returns nothing. If i call LDAP_Vcard not in {host_config .. } client can search nothing.

This is parts of my config
host1 an host2 - is domain1 and domain2

{host_config, "host1.domain.com", [
{auth_method, ldap},
{ldap_servers, ["10.10.10.10"]},
{ldap_port, 389},
{ldap_uids, [{"sAMAccountName"}]},
{ldap_base, "dc=host1,dc=domain,dc=com},
{ldap_rootdn, "user@host1.domain.com"},
{ldap_password, "psw"},
{modules,
[
{mod_adhoc, []},
{mod_announce, [{access, announce}]}, % requires mod_adhoc
{mod_caps, []},
{mod_configure,[]}, % requires mod_adhoc
{mod_disco, []},
{mod_http_bind,[]},
{mod_muc, [
%%{host, "conference.@HOST@"},
{access, muc},
{access_create, muc},
{access_persistent, muc},
{access_admin, muc_admin}
]},
{mod_offline, []},
{mod_pubsub, [ % requires mod_caps
{access_createnode, pubsub_createnode},
{plugins, ["default", "pep"]}
]},
{mod_roster, []},
%%{mod_service_log,[]},
{mod_shared_roster,[]},
%%{mod_stats, []},
{mod_time, []},
% {mod_vcard, []},
{mod_version, []},
{mod_shared_roster_ldap,
[{ldap_groupattr,"department"},
{ldap_groupdesc,"department"},
{ldap_rfilter, "(&(memberOf=CN=JabberUsers,CN=Users,DC=host1,DC=domain,DC=com)))"},
{ldap_memberattr,"sAMAccountName"},
{ldap_userdesc,"cn"}
]}
]}
]}.

Host2 have the same config

And more
{modules,
[{mod_vcard_ldap,
[
{ldap_base, "ou=Users,dc=domain,dc=com"},
{ldap_uids, [{"userPrincipalName", "%u@domain.com"}]},
{ldap_filter, ""},
{ldap_vcard_map,
[{"NICKNAME", "%u", []}, % just use user's part of JID as his nickname
{"GIVEN", "%s", ["givenName"]},
{"FAMILY", "%s", ["sn"]},
{"FN", "%s, %s", ["sn", "givenName"]}, % example: "Smith, John"
{"EMAIL", "%s", ["mail"]},
{"PHOTO", "%s", ["jpegPhoto"]},
{"BDAY", "%s", ["birthDay"]}]},
{ldap_search_fields,
[{"User", "%u"},
{"Name", "givenName"},
{"Family Name", "sn"},
{"Email", "mail"},
{"Birthday", "birthDay"}]},
{ldap_search_reported,
[{"Full Name", "FN"},
{"Nickname", "NICKNAME"},
{"Birthday", "BDAY"}]}
]}
]}.

Can anybody help solve my problem?

Syndicate content