ejabberd icon indicating copy to clipboard operation
ejabberd copied to clipboard

LDAP Contact Shared

Open Gadgetroch opened this issue 7 years ago • 4 comments

Good morning,

I'm trying to get contact by ldap connection. So i use mod_shared_roster_ldap.

mod_roster:
    versioning: true
mod_shared_roster: {}
mod_shared_roster_ldap:
  ldap_base: "cn=Users,dc=PRIVATE,dc=PRIVATE"
  ldap_rfilter: "(objectClass=department)"
  ldap_groupattr: "ou"
  ldap_memberattr: "cn"
  ldap_filter: "(objectClass=department)"
  ldap_userdesc: "displayName"
mod_stats: {}
mod_time: {}
mod_vcard:
  search: false
mod_version: {}

But i see no contact, and i have no error in log.

If you have an idea...

Thank's

Gadgetroch avatar Feb 14 '19 12:02 Gadgetroch

UP ?

Gadgetroch avatar Feb 18 '19 11:02 Gadgetroch

Hi, try use this as an example. I have been using FreeIPA with this config for the last five years: config ldap global section:

ldap_servers:
   - "auth.ipa.example.com"
ldap_encrypt: none
ldap_port: 389
ldap_rootdn: "uid=ejabberd,cn=sysaccounts,cn=etc,dc=example,dc=com"
ldap_password: "ldappasswd"
ldap_base: "dc=example,dc=com"
ldap_uids:
   - "uid": "%u"
ldap_filter: "(&(objectClass=inetOrgPerson)(!(nsAccountLock=TRUE))(memberOf=cn=xmpp_users,cn=groups,cn=accounts,dc=example,dc=com))"

config modules section: module mod_roster enabled! it is important

mod_roster: {}
mod_shared_roster_ldap:
  ldap_base: "cn=users,cn=accounts,dc=example,dc=com"
  ldap_rfilter: "(&(objectClass=inetOrgPerson)(!(nsAccountLock=TRUE))(!(memberOf=cn=service_users,cn=groups,cn=accounts,dc=example,dc=com)))"
  ldap_groupattr: "employeeNumber"
  ldap_memberattr: "uid"
  ldap_userdesc: "displayName"

and config vcard:

mod_vcard:
  db_type: ldap
  search: true
  ldap_vcard_map:
    "NICKNAME": {"%u": []}
    "FN": {"%s": ["displayName"]}
    "FAMILY": {"%s": ["sn"]}
    "GIVEN": {"%s": ["givenName"]}
    "ORGNAME": {"%s": ["company"]}
    "ORGUNIT": {"%s": ["department"]}
    "LOCALITY": {"%s": ["l"]}
    "DESC": {"%s": ["description"]}
    "TEL": {"%s": ["mobile"]}
    "EMAIL": {"%s": ["mail"]}
    "PHOTO": {"%s": ["jpegPhoto"]}

  ldap_search_fields:
    "Name": "givenName"
    "Family Name": "sn"
    "Email": "mail"
    "Company": "company"
    "Department": "department"
    "Role": "title"
    "Description": "description"
    "Phone": "telephoneNumber"

  ldap_search_reported:
    "Full Name": "FN"
    "Nickname": "NICKNAME"
    "Birthday": "BDAY"
    "Email": "EMAIL"

Current version ejabberd: 18.12.1 OS: Centos 7.6

cryol avatar Mar 03 '19 09:03 cryol

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar May 20 '20 21:05 lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar May 20 '20 21:05 lock[bot]