Synology usage series 9 – Setup OpenLDAP


Create LDIF files to import your address book

Below is the sample ldif files i created initially for testing the setup, remember to remove all the comment lines.

If you would like to give the ldif a try, change the values highlighted in red below.


## Firstly, define the ldap server
dn: dc=mydomain,dc=com
dc: mydomain
objectClass: dcObject
objectClass: organization
description: description of your organization
o: domain

## Define administrator
dn: cn=[your ldap admin username],dc=mydomain,,dc=com
objectClass: organizationalRole
cn: [your ldap admin username]
description: LDAP Directory Administrator

## Now defines three user groups below, [Family, Friends, Colleagues]

## Define group - Family
dn: ou=Family,dc=mydomain,dc=com
ou: Family
objectClass: top
objectClass: organizationalUnit
description: Family Members

## Define group - Friends
dn: ou=Friends,dc=mydomain,dc=com
ou: Friends
objectClass: top
objectClass: organizationalUnit
description: Friends

## Define group - Colleagues
dn: ou=colleagues,dc=mydomain,dc=com
ou: Colleagues
objectClass: top
objectClass: organizationalUnit
description: Colleagues

## Finally, define the first contact below, entry is following part of
## outlook/thunderbird ldap schema which should be able to be imported by
## outlook/thunderbird
dn: cn=Ray Chan,ou=Family,dc=mydomain,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
cn: Ray Chan
sn: [Surname]
title: [job title]
ou: [Department]
physicalDeliveryOfficeName: [company name]
o: domain
givenName: [first name]
mail: [email address]
mail: [email address]
mail: [more email address]
mobile: [cell phone number]
homePhone: [home phone number]

save the the ldif files.





6 thoughts


  1. Hi
    Your tutorial is perfect
    i have ds110j and i’ve done everything and it works but i can’t put ldif file to LDAP

    I get
    ldap_bind: Invalid credentials (49)

    I have checked everything but i’m something missing.

    Please can You help ??

    Thankyou

  2. Please can You help me – if it is necessary i can set up my synology on external ip so that You could see it 🙂 Thank You for Your help

    • LDAP schema is a pain to learn.

      I’m not familar with LDAP schema. I’m afraid I don’t have enough skill to debug your LDIF.

      I’m also new to LDAP things. It took me couple days to write the LDIF sample in page 2 -_-;

      By the way, make sure you are binding as ldap administrator when running ldapadd (make sure the password is correct)

      Good Luck!

  3. How can i check it if the password is ok. i used slappasswd and got a password in ssh hash and i have put it in slapd.conf

    What else can i check ??

Leave a Reply

Your email address will not be published. Required fields are marked *