Synology usage series 9 – Setup OpenLDAP


Import the ldif data

# ldapadd -f [your ldif file name] -xv -D "cn=[your ldap admin username],dc=mydomain,dc=com" -h localhost -W

You will prompted for password defined in slapd.conf

Update: Jan 22, 2010

For firmware 2.2 user, a firewall rule is required for external access of the LDAP server.

Network Services > Firewall > Click ‘Create’ button

Ports > Check ‘Custom’ radio button > Click ‘Custom’ button

Synology: Adding a new firewall rule with custom port

To add a new custom port:

Ports: Type: Destination Port
Protocol: TCP
Ports: 389

Synology: Adding new firewall rule for LDAP server : Port 389 : TCP

Synology: Adding new firewall rule for LDAP server : Port 389 : TCP

Source IP: ALL (or any other permitted IP address)

DiskStation: Firewall: Assign 'ALL' for source IP

Action : Access : Allow

DiskStation: Firewall: Allow an firewall rule

Setup Completed!

Now use any ldap browser to see what we have in the new OpenLDAP server:

host: [your ip address of ds207+]
port: 389
protocol: 3
base DN: dc=mydomain,dc=com
Anonymous bind: no
User DN: cn=[your ldap admin username],dc=mydomain,dc=com
Password: password of ldap admin

LDAP Browser Example

LDAP Browser Example





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 *