URL: https://www.opennet.me/cgi-bin/openforum/vsluhboard.cgi
Форум: vsluhforumID1
Нить номер: 80234
[ Назад ]

Исходное сообщение
"Ejabberd, mod_vcard_ldap и Active Directory"

Отправлено 0x21h , 12-Май-08 13:21 
Приветствую всех.

Помогите плз решить проблемку, кто сталкивался с настройкой данной связки.
Решил настроить уже работающий jabber-сервер на синхронизацию по AD.
Эту задачу я решил. Проблема возникла на этапе настройки модуля mod_vcard_ldap, т.е поиска по базе.
Не работает в принципе. Никак, ни при каких условиях не получается его заставить хоть как то работать. В дебаге ошибок нет. Долго гуглил, результата ноль.

Ejabberd сервер версии 2.0.0
Конфига такая.

%% Authentication using LDAP
{auth_method, ldap}.
{ldap_servers, ["domain.ru"]}.
{ldap_uids, [{"sAMAccountName"}]}.
{ldap_base, "dc=domain,dc=ru"}.
{ldap_rootdn, "CN=Jabber server,CN=Users,dc=domain,dc=ru"}.
{ldap_password, "secret"}.
{ldap_filter, "(memberOf=*)"}.

{mod_vcard_ldap,
        [{host, "users.@HOST@"},
        {ldap_vcard_map,
                [{"NICKNAME", "%u", []},
                {"GIVEN", "%s", ["givenName"]},
                {"MIDDLE", "%s", ["initials"]},
                {"FAMILY", "%s", ["sn"]},
                {"FN", "%s", ["displayName"]},
                {"EMAIL", "%s", ["mail"]},
                {"ORGNAME", "%s", ["company"]},
                {"ORGUNIT", "%s", ["department"]},
                {"CTRY", "%s", ["c"]},
                {"LOCALITY", "%s", ["l"]},
                {"STREET", "%s", ["streetAddress"]},
                {"REGION", "%s", ["st"]},
                {"PCODE", "%s", ["postalCode"]},
                {"TITLE", "%s", ["title"]},
                {"URL", "%s", ["wWWHomePage"]},
                {"DESC", "%s", ["description"]},
                {"TEL", "%s", ["telephoneNumber"]}]},
      {ldap_search_fields,
                [{"User", "%u"},
                {"Name", "givenName"},
                {"Family Name", "sn"},
                {"Email", "mail"},
                {"Phone", "telephoneNumber"}
        ]},
      {ldap_search_reported,
                [{"Full Name", "FN"},
                {"Nickname", "NICKNAME"},
                {"Email", "EMAIL"}]}
        ]}
]}.


Содержание

Сообщения в этом обсуждении
"Ejabberd, mod_vcard_ldap и Active Directory"
Отправлено 0x21h , 12-Май-08 22:27 
Выяснил несколько моментов.
Поиск на AD проходит успешно. Это видно tcpdump-ом с выводом подробностей.
А в лог пишется такое дело.

Error in process <0.364.0> on node 'ejabberd@localhost' with exit value: {function_clause,[{eldap_utils,find_ldap_attrs,[[{"sAMAccountName"}],[{"displayName",["denis"]}]]},{mod_vcard_ldap,'-search_items/2-fun-2-',5},{lists,flatmap,2},{mod_vcard_ldap,search_result,4},{mod_vcard_ldap,route,4}]}

Собственно при поиске пользователя "denis".
В результате клиенту возвращается кукиш без масла.

Все выходные ковырялся с этой проблемой и похоже это еще не конец.


"Ejabberd, mod_vcard_ldap и Active Directory"
Отправлено 0x21h , 13-Май-08 12:27 
Решил проблему.
Ошибочка была где то в разборе строк.
Решилась заменой строк в конфиге

-- {ldap_uids, [{"sAMAccountName"}]}.
++ {ldap_uids, [{"userPrincipalName", "%u@domain.ru"}]}.

Поиск по AD работает! Ура!


"Ejabberd, mod_vcard_ldap и Active Directory"
Отправлено abryanskiy , 19-Фев-09 11:32 
>Решил проблему.
>Ошибочка была где то в разборе строк.
>Решилась заменой строк в конфиге
>
>-- {ldap_uids, [{"sAMAccountName"}]}.
>++ {ldap_uids, [{"userPrincipalName", "%u@domain.ru"}]}.
>
>Поиск по AD работает! Ура!

У меня почему-то не работает. Все делал так как Вы описываете.
Процессы есть, а порты не слушаются...
в sasl.log пишется следующее

=CRASH REPORT==== 19-Feb-2009::11:28:53 ===
  crasher:
    pid: <0.36.0>
    registered_name: []
    error_info: {bad_return,{{ejabberd_app,start,[normal,[]]},
                              {'EXIT',[47,
                                       117,
                                       115,
                                       114,
                                       47,
                                       108,
                                       111,
                                       99,
                                       97,
                                       108,
                                       47,
                                       101,
                                       106,
                                       97,
                                       98,
                                       98,
                                       101,
                                       114,
                                       100,
                                       45,
                                       50,
                                       46,
                                       48,
                                       46,
                                       48,
                                       47,
                                       99,
                                       111,
                                       110,
                                       102,
                                       47,
                                       101,
                                       106,
                                       97,
                                       98,
                                       98,
                                       101,
                                       114,
                                       100,
                                       46,
                                       99,
                                       102,
                                       103,
                                       58,
                                       32,
                                       "474",
                                       58,
                                       32,
                                       ["syntax error before: ",["']'"]]]}}}
    initial_call: {application_master,
                     init,
                     [<0.5.0>,
                      <0.35.0>,
                      {appl_data,
                          ejabberd,
                          [ejabberd,
                           ejabberd_sup,
                           ejabberd_auth,
                           ejabberd_router,
                           ejabberd_sm,
                           ejabberd_s2s,
                           ejabberd_local,
                           ejabberd_listeners,
                           ejabberd_iq_sup,
                           ejabberd_service_sup,
                           ejabberd_s2s_out_sup,
                           ejabberd_s2s_in_sup,
                           ejabberd_c2s_sup,
                           ejabberd_mod_roster,
                           ejabberd_mod_echo,
                           ejabberd_mod_pubsub,
                           ejabberd_mod_irc,
                           ejabberd_mod_muc,
                           ejabberd_offline,
                           random_generator],
                          undefined,
                          {ejabberd_app,[]},
                          [acl,
                           adhoc,
                           configure,
                           cyrsasl_anonymous,
                           cyrsasl,
                           cyrsasl_digest,
                           cyrsasl_plain,
                           ejabberd_admin,
                           ejabberd_app,
                           ejabberd_auth_anonymous,
                           ejabberd_auth,
                           ejabberd_auth_external,
                           ejabberd_auth_internal,
                           ejabberd_auth_ldap,
                           ejabberd_auth_odbc,
                           ejabberd_auth_pam,
                           ejabberd,
                           ejabberd_c2s,
                           ejabberd_c2s_config,
                           ejabberd_config,
                           ejabberd_ctl,
                           ejabberd_frontend_socket,
                           ejabberd_hooks,
                           ejabberd_http,
                           ejabberd_http_bind,
                           ejabberd_http_poll,
                           ejabberd_listener,
                           ejabberd_local,
                           ejabberd_logger_h,
                           ejabberd_loglevel,
                           ejabberd_node_groups,
                           ejabberd_rdbms,
                           ejabberd_receiver,
                           ejabberd_router,
                           ejabberd_s2s,
                           ejabberd_s2s_in,
                           ejabberd_s2s_out,
                           ejabberd_service,
                           ejabberd_sm,
                           ejabberd_socket,
                           ejabberd_sup,
                           ejabberd_system_monitor,
                           ejabberd_tmp_sup,
                           ejabberd_update,
                           ejabberd_web_admin,
                           ejabberd_web,
                           ejabberd_zlib,
                           ejd2odbc,
                           eldap,
                           eldap_filter,
                           eldap_pool,
                           eldap_utils,
                           'ELDAPv3',
                           extauth,
                           gen_iq_handler,
                           gen_mod,
                           gen_pubsub_node,
                           gen_pubsub_nodetree,
                           iconv,
                           idna,
                           jd2ejd,
                           jlib,
                           mod_adhoc,
                           mod_announce,
                           mod_caps,
                           mod_configure2,
                           mod_configure,
                           mod_disco,
                           mod_echo,
                           mod_http_bind,
                           mod_http_fileserver,
                           mod_irc,
                           mod_irc_connection,
                           mod_last,
                           mod_last_odbc,
                           mod_muc,
                           mod_muc_log,
                           mod_muc_room,
                           mod_offline,
                           mod_offline_odbc,
                           mod_privacy,
                           mod_privacy_odbc,
                           mod_private,
                           mod_private_odbc,
                           mod_proxy65,
                           mod_proxy65_lib,
                           mod_proxy65_service,
                           mod_proxy65_sm,
                           mod_proxy65_stream,
                           mod_pubsub,
                           mod_register,
                           mod_roster,
                           mod_roster_odbc,
                           mod_service_log,
                           mod_shared_roster,
                           mod_stats,
                           mod_time,
                           mod_vcard,
                           mod_vcard_ldap,
                           mod_vcard_odbc,
                           mod_version,
                           node_buddy,
                           node_club,
                           node_default,
                           node_dispatch,
                           node_pep,
                           node_private,
                           node_public,
                           nodetree_default,
                           nodetree_virtual,
                           p1_fsm,
                           p1_mnesia,
                           ram_file_io_server,
                           randoms,
                           sha,
                           shaper,
                           stringprep,
                           stringprep_sup,
                           tls,
                           translate,
                           xml,
                           xml_stream,
                           'XmppAddr'],
                          [],
                          infinity,
                          infinity},
                      normal]}
    ancestors: [<0.35.0>]
    messages: [{'EXIT',<0.37.0>,normal}]
    links: [<0.35.0>,<0.5.0>]
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 1597
    stack_size: 21
    reductions: 2041
  neighbours:


"Ejabberd, mod_vcard_ldap и Active Directory"
Отправлено 0x21h , 15-Фев-10 11:48 
>[оверквотинг удален]
>>-- {ldap_uids, [{"sAMAccountName"}]}.
>>++ {ldap_uids, [{"userPrincipalName", "%u@domain.ru"}]}.
>>
>>Поиск по AD работает! Ура!
>
>У меня почему-то не работает. Все делал так как Вы описываете.
>Процессы есть, а порты не слушаются...
>в sasl.log пишется следующее
>
>=CRASH REPORT==== 19-Feb-2009::11:28:53 ===

.....          
>          
>          
>     ["syntax error before: ",["']'"]]]}}}
>    initial_call: {application_master,
>            

Ошибка в синтаксите. Смотрите конфигу.
P.S почти год назад было :)