Hi,
I have difficulty getting mod_vcard_ldap to work against windows AD (ejabberd itself runs on a debian box). Here is relavant parts of my .cfg, ldap auth works fine:
{auth_method, [ldap, internal]}. %% List of LDAP servers: {ldap_servers, ["DC1.domain.com","DC2.domain.com","DC3.domain.com"]}. %% %% LDAP attribute that holds user ID: {ldap_uids, [{"sAMAccountName","%u"}]}. {ldap_filter, "(&(objectClass=user)(objectCategory=person))"}. %% %%% Search base of LDAP directory: {ldap_base, "OU=ejabberd,OU=testusers,OU=users,DC=domain,DC=com"}. %% %% LDAP manager: %% ************************************************************************************************ %% Note for LDAP Manager : if this account is only member of the "Domain users" group it MUST BE %% -----> Member of the Ejabberd server "Administrators" group %% -----> Allowed to log on locally to the Ejabberd server %% ************************************************************************************************ {ldap_rootdn, "CN=ejabber adreader,OU=Spetsiaal Userid,OU=Groups,DC=domain,DC=com"}. %% Password to LDAP manager: {ldap_password, "password"}.
Modules conf
{modules, [ {mod_adhoc, []}, {mod_announce, [{access, announce}]}, % requires mod_adhoc {mod_caps, []}, {mod_configure,[]}, % requires mod_adhoc {mod_ctlextra, []}, {mod_disco, []}, %%{mod_echo, [{host, "echo.localhost"}]}, {mod_irc, []}, {mod_last, []}, {mod_muc, [ %%{host, "conference.@HOST@"}, {access, muc}, {access_create, muc}, {access_persistent, muc}, {access_admin, muc_admin}, {max_users, 500} ]}, %%{mod_muc_log,[]}, {mod_offline, []}, {mod_privacy, []}, {mod_private, []}, {mod_proxy65, [ {access, local}, {shaper, c2s_shaper} ]}, {mod_pubsub, [ % requires mod_caps {access_createnode, pubsub_createnode}, {plugins, ["default", "pep"]} ]}, {mod_register, [ %% %% After successful registration, the user receives %% a message with this subject and body. %% {welcome_message, {"Welcome!", "Welcome to a Jabber service powered by Debian. " "For information about Jabber visit " "http://www.jabber.org"}}, %% Replace it with 'none' if you don't want to send such message: %%{welcome_message, none}, %% %% When a user registers, send a notification to %% these Jabber accounts. %% %%{registration_watchers, ["admin1@example.org"]}, {access, register} ]}, {mod_roster, []}, %%{mod_service_log,[]}, %%{mod_shared_roster,[]}, {mod_stats, []}, {mod_time, []}, {mod_version, []}, %%Vcard test {mod_vcard_ldap, [ {ldap_servers, ["DC1.domain.com","DC2.domain.com","DC3.domain.com"]}, {ldap_rootdn, "CN=ejabber adreader,OU=Spetsiaal Userid,OU=Groups,DC=domain,DC=com"}, {ldap_password, "password"}, {ldap_base, "OU=ejabberd,OU=testusers,OU=users,DC=domain,DC=com"}, {ldap_filter, "(&(objectClass=user)(objectCategory=person))"}, {ldap_uids, [{"sAMAccountName","%u"}]}, %%--------------------------------------------- {ldap_vcard_map, [{"NICKNAME", "%u", ["nickname"]}, {"GIVEN", "%s", ["givenname"]}, {"FAMILY", "%s", ["sn"]}, {"FN", "%s, %s", ["sn", "givenName"]}, {"EMAIL", "%s", ["mail"]}]}, {ldap_search_fields, [{"User", "uid"}, {"Name", "givenName"}, {"Family Name", "sn"}, {"Email", "mail"}]}, {ldap_search_reported, [{"Perekonnanimi", "FAMILY"}, {"Eesnimi", "GIVEN"}]} ]}, ]}.
Also tried this:
{mod_vcard_ldap, [ {ldap_base, "OU=ejabberd,OU=testusers,OU=users,DC=domain,DC=com"}, {ldap_vcard_map, [ {"NICKNAME", "%s", ["displayName"]}, {"GIVEN", "%s", ["givenName"]}, {"FAMILY", "%s", ["sn"]}, {"FN", "%s", ["displayName"]}, {"EMAIL", "%s", ["mail"]} ]}, {ldap_search_fields, [{"User", "%u"}, {"Name", "givenName"}, {"Family Name", "sn"}, {"Email", "mail"} ]}, {ldap_search_reported, [ {"Full Name", "FN"}, {"Email", "EMAIL"} ]} ]},
--------------------------------------
And this:
--------------------------------------
{mod_vcard_ldap, [ {auth_method, [ldap]}, {ldap_servers, ["dc1.just.sise"]}, {ldap_uids, [{"sAMAccountName","%u"}]}, %oige%%% {ldap_uids, [{"UID","%u"}]} {ldap_base, "OU=ejabberd,OU=testusers,OU=users,DC=domain,DC=com"}, {ldap_rootdn, "CN=ejabber adreader,OU=Spetsiaal Userid,OU=Groups,DC=domain,DC=com"}, {ldap_password, "password"}, {ldap_filter, "(&(objectClass=user)(objectCategory=person))"}, {ldap_vcard_map,[ {"NICKNAME", "%s %s", ["givenName", "sn"]}, {"GIVEN", "%s", ["givenName"]}, {"FAMILY", "%s", ["sn"]}, {"FN", "%s", ["displayName"]}, {"EMAIL", "%s", ["mail"]}, {"ORGNAME", "%s", ["company"]}, {"ORGUNIT", "%s", ["department"]}, {"TITLE", "%s", ["title"]}, {"DESC", "%s", ["description"]}, {"TEL", "%s", ["telephoneNumber"]} ]}, {ldap_search_fields,[ {"User", "%u"}, {"Name", "givenName"}, {"Family Name", "sn"}, {"Email", "mail"}, {"Company", "company"}, {"Department", "department"}, {"Role", "title"}, {"Description", "description"}, {"Phone", "telephoneNumber"} ]}, {ldap_search_reported,[ {"Name", "givenName"}, {"Family Name", "sn"}, {"Full Name", "FN"}, {"Email", "EMAIL"} ]} ]},
None of those work, ejabber wont start and in sasl.log :
=CRASH REPORT==== 10-Mar-2009::09:37:06 ===
crasher:
pid: <0.285.0>
registered_name: []
exception exit: {bad_return,
{{ejabberd_app,start,[normal,[]]},
{'EXIT',
[47,101,116,99,47,101,106,97,98,98,101,114,100,
47,101,106,97,98,98,101,114,100,46,99,102,103,
58,32,"588",58,32,
["syntax error before: ","'.'"]]}}}
in function application_master:init/4
initial call: application_master:init(<0.254.0>,<0.284.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_ctlextra,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.284.0>]
messages: [{'EXIT',<0.286.0>,normal}]
links: [<0.284.0>,<0.254.0>]
dictionary: []
trap_exit: true
status: running
heap_size: 987
stack_size: 23
reductions: 126
neighbours:
Have i misconfigured something?
Syntax mistake, remove comma at the end
None of those work, ejabberd wont start and in sasl.log :
=CRASH REPORT==== 10-Mar-2009::09:37:06 ===
crasher:
pid: <0.285.0>
registered_name: []
exception exit: {bad_return,
{{ejabberd_app,start,[normal,[]]},
{'EXIT',
[47,101,116,99,47,101,106,97,98,98,101,114,100,
47,101,106,97,98,98,101,114,100,46,99,102,103,
58,32,"588",58,32,
["syntax error before: ","'.'"]]}}}
in function application_master:init/4
initial call: application_master:init(<0.254.0>,<0.284.0>,
...
Have i misconfigured something?
Yes, ejabberd refuses to start because there is a syntax error in the configuration file. The error message does not exactly indicate where the problem is, but I think I found it.
ejabberd.cfg explains in the beginning:
In your case, you have something like:
Thank you, that blasted comma
Thank you, that blasted comma was the "buG"