Announcement

Collapse
No announcement yet.

LDAP Addressbook Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • LDAP Addressbook Plugin

    I had followed "OX Installation and Configuration of LDAP Addressbook Plugin" at http://oxpedia.org/wiki/index.php?ti...ntacts_LDAP_AD


    My 389 Directory Server is defined as follows:

    # groups branch
    -----------------
    Code:
    dn: ou=Groups,dc=ccvision,dc=sytes,dc=net
    objectclass:organizationalunit
    ou: Groups
    description: Group of Users branch

    # ccv-common entry under groups
    -------------------------------
    Code:
    dn: cn=ccv-common,ou=groups,dc=ccvision,dc=sytes,dc=net
    objectclass: top
    objectclass: posixGroup
    objectclass: sambaGroupMapping
    objectclass: groupofnames
    cn: ccv-common
    description: all users group
    member: cn=rpfotenh,ou=Users,dc=ccvision,dc=sytes,dc=net
    cn=root,ou=Users,dc=ccvision,dc=sytes,dc=net
    cn=nobody,ou=Users,dc=ccvision,dc=sytes,dc=net

    # ccv-policy entry under groups
    --------------------------------
    Code:
    dn: cn=ccv-policy,ou=groups,dc=ccvision,dc=sytes,dc=net
    objectclass: top
    objectclass: posixGroup
    objectclass: sambaGroupMapping
    objectclass: groupofnames
    cn: ccv-policy
    description: Policy authors
    member: cn=rpfotenh,ou=Users,dc=ccvision,dc=sytes,dc=net

    My mapping.openldap.properties is defined as follows:


    Code:
    #################
    #
    # Mappings 
    # The left side contains the values in OX, and the right side contains the value name for ldap
    
    # This part contains the openLdap mapping
    
    # Required
    com.openexchange.contacts.ldap.mapping.openldap.uniqueid            = uid
    
    # Optional
    com.openexchange.contacts.ldap.mapping.openldap.displayname         = displayName
    com.openexchange.contacts.ldap.mapping.openldap.givenname           = givenName
    com.openexchange.contacts.ldap.mapping.openldap.surname             = sn
    com.openexchange.contacts.ldap.mapping.openldap.email1              = mail
    com.openexchange.contacts.ldap.mapping.openldap.department          =
    com.openexchange.contacts.ldap.mapping.openldap.company             =
    
    # The name of the attribute where the name of distributionlists is stored
    com.openexchange.contacts.ldap.mapping.openldap.distributionlistname = cn
    
    # This attribute must be set to have a uid field for distributionlists because this
    # differs from the uid for user object on some LDAP servers
    com.openexchange.contacts.ldap.mapping.openldap.distributionuid = gidNumber
    
    com.openexchange.contacts.ldap.mapping.openldap.birthday				=
    com.openexchange.contacts.ldap.mapping.openldap.anniversary			=
    com.openexchange.contacts.ldap.mapping.openldap.branches				=
    com.openexchange.contacts.ldap.mapping.openldap.business_category		=
    com.openexchange.contacts.ldap.mapping.openldap.postal_code_business		= postalCode
    com.openexchange.contacts.ldap.mapping.openldap.state_business			= st
    com.openexchange.contacts.ldap.mapping.openldap.street_business			= street
    com.openexchange.contacts.ldap.mapping.openldap.telephone_callback		=
    com.openexchange.contacts.ldap.mapping.openldap.city_home			=
    com.openexchange.contacts.ldap.mapping.openldap.commercial_register		=
    com.openexchange.contacts.ldap.mapping.openldap.country_home			=
    com.openexchange.contacts.ldap.mapping.openldap.email2				=
    com.openexchange.contacts.ldap.mapping.openldap.email3				=
    com.openexchange.contacts.ldap.mapping.openldap.employeetype			=
    com.openexchange.contacts.ldap.mapping.openldap.fax_business			= facsimileTelehoneNumber
    com.openexchange.contacts.ldap.mapping.openldap.fax_home				=
    com.openexchange.contacts.ldap.mapping.openldap.fax_other			=
    com.openexchange.contacts.ldap.mapping.openldap.instant_messenger1		=
    com.openexchange.contacts.ldap.mapping.openldap.instant_messenger2		=
    com.openexchange.contacts.ldap.mapping.openldap.telephone_ip			= 
    com.openexchange.contacts.ldap.mapping.openldap.telephone_isdn			= internationaliSDNNumber
    com.openexchange.contacts.ldap.mapping.openldap.mail_folder_drafts_name		=
    com.openexchange.contacts.ldap.mapping.openldap.mail_folder_sent_name		=
    com.openexchange.contacts.ldap.mapping.openldap.mail_folder_spam_name		=
    com.openexchange.contacts.ldap.mapping.openldap.mail_folder_trash_name		=
    com.openexchange.contacts.ldap.mapping.openldap.manager_name			=
    com.openexchange.contacts.ldap.mapping.openldap.marital_status			=
    com.openexchange.contacts.ldap.mapping.openldap.cellular_telephone1		= mobile
    com.openexchange.contacts.ldap.mapping.openldap.cellular_telephone2		=
    com.openexchange.contacts.ldap.mapping.openldap.info				= description
    com.openexchange.contacts.ldap.mapping.openldap.nickname				=
    com.openexchange.contacts.ldap.mapping.openldap.number_of_children		=
    com.openexchange.contacts.ldap.mapping.openldap.note				=
    com.openexchange.contacts.ldap.mapping.openldap.number_of_employee		=
    com.openexchange.contacts.ldap.mapping.openldap.telephone_pager			= pager
    com.openexchange.contacts.ldap.mapping.openldap.telephone_assistant		= 
    com.openexchange.contacts.ldap.mapping.openldap.telephone_business1		= telephoneNumber
    com.openexchange.contacts.ldap.mapping.openldap.telephone_business2		=
    com.openexchange.contacts.ldap.mapping.openldap.telephone_car			=
    com.openexchange.contacts.ldap.mapping.openldap.telephone_company		=
    com.openexchange.contacts.ldap.mapping.openldap.telephone_home1			= homePhone
    com.openexchange.contacts.ldap.mapping.openldap.telephone_home2			=
    com.openexchange.contacts.ldap.mapping.openldap.telephone_other			=
    com.openexchange.contacts.ldap.mapping.openldap.postal_code_home			= 
    com.openexchange.contacts.ldap.mapping.openldap.profession			=
    com.openexchange.contacts.ldap.mapping.openldap.telephone_radio			=
    com.openexchange.contacts.ldap.mapping.openldap.room_number			= roomNumber
    com.openexchange.contacts.ldap.mapping.openldap.sales_volume			=
    com.openexchange.contacts.ldap.mapping.openldap.city_other			=
    com.openexchange.contacts.ldap.mapping.openldap.country_other			=
    com.openexchange.contacts.ldap.mapping.openldap.middle_name			= 
    com.openexchange.contacts.ldap.mapping.openldap.postal_code_other		=
    com.openexchange.contacts.ldap.mapping.openldap.state_other			=
    com.openexchange.contacts.ldap.mapping.openldap.street_other			=
    com.openexchange.contacts.ldap.mapping.openldap.spouse_name			=
    com.openexchange.contacts.ldap.mapping.openldap.state_home			=
    com.openexchange.contacts.ldap.mapping.openldap.street_home			=
    com.openexchange.contacts.ldap.mapping.openldap.suffix				=
    com.openexchange.contacts.ldap.mapping.openldap.tax_id				=
    com.openexchange.contacts.ldap.mapping.openldap.telephone_telex			=
    com.openexchange.contacts.ldap.mapping.openldap.telephone_ttytdd			=
    com.openexchange.contacts.ldap.mapping.openldap.url				= labeledUri
    com.openexchange.contacts.ldap.mapping.openldap.userfield01			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield02			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield03			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield04			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield05			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield06			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield07			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield08			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield09			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield10			=	
    com.openexchange.contacts.ldap.mapping.openldap.userfield11			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield12			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield13			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield14			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield15			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield16			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield17			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield18			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield19			=
    com.openexchange.contacts.ldap.mapping.openldap.userfield20			=
    com.openexchange.contacts.ldap.mapping.openldap.city_business			= l
    com.openexchange.contacts.ldap.mapping.openldap.country_business			= businessCategory
    com.openexchange.contacts.ldap.mapping.openldap.assistant_name			=
    com.openexchange.contacts.ldap.mapping.openldap.telephone_primary		=
    com.openexchange.contacts.ldap.mapping.openldap.categories			=
    # Integer value between 1 and 3 specifying one of the values in email1... email3
    com.openexchange.contacts.ldap.mapping.openldap.defaultaddress			=
    com.openexchange.contacts.ldap.mapping.openldap.title				= title
    com.openexchange.contacts.ldap.mapping.openldap.position				=
    com.openexchange.contacts.ldap.mapping.openldap.lastmodified			= 
    com.openexchange.contacts.ldap.mapping.openldap.creationdate			=

    my LDAPglobal1.properties file is defined as follows:


    Code:
    # A property file for the context with id 1
    
    # Specify the uri of the LDAP server here e.g. ldap://localhost
    com.openexchange.contacts.ldap.context1.LDAPglobal1.uri=ldap://localhost
    
    # Specify the baseDN of users
    com.openexchange.contacts.ldap.context1.LDAPglobal1.baseDN_users=ou=Groups,dc=ccvision,dc=sytes,dc=net
    
    # bindDN
    com.openexchange.contacts.ldap.context1.LDAPglobal1.AdminDN=cn=Directory Manager
    
    # bindDN password
    com.openexchange.contacts.ldap.context1.LDAPglobal1.AdminBindPW=humberstone
    
    # search base (sub, base, one)
    com.openexchange.contacts.ldap.context1.LDAPglobal1.searchScope=sub
    
    # Possible values are "anonymous", "AdminDN" or "user"
    com.openexchange.contacts.ldap.context1.LDAPglobal1.authtype=AdminDN
    
    # Possible values are "server", "groupware"
    com.openexchange.contacts.ldap.context1.LDAPglobal1.sorting=groupware
    
    # Possible values are: login, mail, and (name) 
    com.openexchange.contacts.ldap.context1.LDAPglobal1.userLoginSource=name
    
    # userSearchFilter=(objectclass=user)
    com.openexchange.contacts.ldap.context1.LDAPglobal1.userSearchFilter=
    
    # user search scope Possible value are sub, base and one
    com.openexchange.contacts.ldap.context1.LDAPglobal1.userSearchScope=
    
    # This attribute contains the loginname which is used for the groupware (name)
    com.openexchange.contacts.ldap.context1.LDAPglobal1.userSearchAttribute=
    
    # If empty the global baseDN will be used
    com.openexchange.contacts.ldap.context1.LDAPglobal1.userSearchBaseDN=
    
    # Possible values are "anonymous" or "AdminDN"
    com.openexchange.contacts.ldap.context1.LDAPglobal1.userAuthType=AdminDN
    
    # If empty the global AdminDN will be used
    com.openexchange.contacts.ldap.context1.LDAPglobal1.userAdminDN=
    
    # If empty the global AdminBindPW will be used
    com.openexchange.contacts.ldap.context1.LDAPglobal1.userAdminBindPW=
    
    # Possible values are "true", "false"
    com.openexchange.contacts.ldap.context1.LDAPglobal1.memorymapping=false
    
    # Setting this value to 0 disables paged results
    com.openexchange.contacts.ldap.context1.LDAPglobal1.pagesize=0
    
    # file contains the mapping for the attributes
    com.openexchange.contacts.ldap.context1.LDAPglobal1.mappingfile=mapping.openldap.properties
    
    # foldername for the global ldap folder (automatically setup)
    com.openexchange.contacts.ldap.context1.LDAPglobal1.foldername=LDAP-Address-Book
    
    # searchfilter for the global ldap folder [searchfilter=(objectclass=user)]
    com.openexchange.contacts.ldap.context1.LDAPglobal1.searchfilter=(objectclass=person)
    
    # Maybe "users", "distributionlists", or "both"
    com.openexchange.contacts.ldap.context1.LDAPglobal1.contactTypes=users
    
    # if empty the default searchfilter will be used [searchfilter_distributionlist=(objectclass=group)]
    com.openexchange.contacts.ldap.context1.LDAPglobal1.searchfilter_distributionlist=
    
    # Specify the search scope for distributionlists (sub, base, one)
    com.openexchange.contacts.ldap.context1.LDAPglobal1.searchScope_distributionlist=
    
    # If empty the default baseDN will be used 
    com.openexchange.contacts.ldap.context1.LDAPglobal1.baseDN_distributionlist=
    
    com.openexchange.contacts.ldap.context1.LDAPglobal1.outlook_support=false
    
    com.openexchange.contacts.ldap.context1.LDAPglobal1.ADS_deletion_support=false
    
    com.openexchange.contacts.ldap.context1.LDAPglobal1.referrals=follow
    
    com.openexchange.contacts.ldap.context1.LDAPglobal1.refreshinterval=10000
    
    com.openexchange.contacts.ldap.context1.LDAPglobal1.pooltimeout=
    
    com.openexchange.contacts.ldap.context1.LDAPglobal1.derefAliases=


    Next I have checked the plugin with:

    Code:
    /opt/open-xchange/sbin/listbundles | grep contacts.ldap
    The following output appears:
    Code:
    bundlename: com.openexchange.contacts.ldap status: ACTIVE
    
    [root@xxx ~]# /opt/open-xchange/sbin/listbundles | grep contacts.ldap


    I also tested the LDAP entries with:

    Code:
    [root@xxx ~]# ldapsearch -x -h localhost:389 -b ou=Groups,dc=ccvision,dc=sytes,dc=net -s one "(&(objectclass=groupofnames)(objectclass=posixGroup))" member

    result
    -------
    Code:
    # extended LDIF
    #
    # LDAPv3
    # base <ou=Groups,dc=ccvision,dc=sytes,dc=net> with scope oneLevel
    # filter: (&(objectclass=groupofnames)(objectclass=posixGroup))
    # requesting: member
    #
    
    # ccv-policy, Groups, ccvision.sytes.net
    dn: cn=ccv-policy,ou=Groups,dc=ccvision,dc=sytes,dc=net
    member: cn=rpfotenh,ou=Users,dc=ccvision,dc=sytes,dc=net
    member: cn=root,ou=Users,dc=ccvision,dc=sytes,dc=net
    
    # ccv-common, Groups, ccvision.sytes.net
    dn: cn=ccv-common,ou=Groups,dc=ccvision,dc=sytes,dc=net
    member: cn=rpfotenh,ou=Users,dc=ccvision,dc=sytes,dc=net
    member: cn=root,ou=Users,dc=ccvision,dc=sytes,dc=net
    member: cn=nobody,ou=Users,dc=ccvision,dc=sytes,dc=net
    
    # search result
    search: 2
    result: 0 Success
    
    # numResponses: 3
    # numEntries: 2
    [root@xxx ~]#

    Now my problem is that when I go to LDAP-Address-Book in OX I do not see any names. I have changed the baseDN_users to ou=Users,dc=ccvision,dc=sytes,dc=net, but this gives an error.

    I cannot for the life of me see how OX returns People objects because searchfilter=(objectclass=person) and I would expect that the results should be people names.

    Can anyone help!
Working...
X