LDAP Server Installation on Linux

To install LDAP server on Linux, do the following:

  1. Stop the Control service (System > Services > LDAP > right-click Stop Module 'Control')

  2. Rename folder of c:\Program Files\IceWarp\ldap\data to c:\Program Files\IceWarp\ldap\data.bak

  3. Create a new folder - c:\Program Files\IceWarp\ldap\data

  4. Edit the c:\Program Files\IceWarp\ldap\slapd.conf file and change the "# ldbm database definitions" section like this:

    atabase bdb

    suffix "o=testes.icewarp.com.br"

    rootdn "cn=Manager,o=testes.icewarp.com.br"

    rootpw put-your-password-here

    # The database directory MUST exist prior to running slapd AND # should only be accessible by the slapd/tools. Mode 700 recommended.

    #directory %LOCALSTATEDIR%/openldap-ldbm

     

    # Indices to maintain

    index objectClass eq

     

    # The database directory MUST exist prior to running slapd AND # should only be accessible by the slapd and slap tools.

    # Mode 700 recommended.

    directory ./data

  5. Within the System > Services > LDAP dialog > Properties tab, enter the port number for LDAP (389 by default, if 389 is used (by AD for example), choose an another port).

  6. Start the Control service (System > Services > LDAP > right-click Start Module 'Control').

  7. Create a new file - c:\Program Files\IceWarp\ldap\create-custom.ldif with the following content:

    o=testes.icewarp.com.br

    objectClass: organization

    o: testes.icewarp.com.br

    description: test

    dn: cn=Manager, o=testes.icewarp.com.br

    objectclass: organizationalRole

    cn: Manager

    description: Directory Manager

     

    dn: ou=users, o=testes.icewarp.com.br

    ou: users

    objectClass: organizationalunit

    objectClass: top

     

    dn: ou=groupes, o=testes.icewarp.com.br

    ou: groupes

    objectClass: organizationalunit

    objectClass: top

  8. Add the nodes declared in custom-create.ldif:

    ldapadd -f create-custom.ldif -D "cn=manager, o=testes.icewarp.com.br" -w admin

    (ldapadd.exe is in the c:\Program Files\IceWarp\ldap directory.)

    This command will output:

    adding new entry "o=testes.icewarp.com.br"

    adding new entry "cn=Manager, o=testes.icewarp.com.br"

    adding new entry "ou=users, o=testes.icewarp.com.br"

    adding new entry "ou=groupes, o=testes.icewarp.com.br"

  9. Check contents of LDAP:

    ldapsearch -b "o=testes.icewarp.com.br" objectclass=*

    --> it should list four entries.

  10. Configure Domains & Accounts > Global Settings > Advanced:

    LDAP server : <IP>:<port>

    Base DN : ou=users, o=testes.icewarp.com.br

    User DN : cn=Manager, o=testes.icewarp.com.br

    password : <the one entered in slapd.conf>

  11. On the Domains & Accounts > Global settings > Advanced tab, click the Synchronize All Users... button

  12. Check the result, use either the tool.exe file or the command line:

    ldapsearch -b "o=testes.icewarp.com.br" objectclass=*

    --> it should list all 'user' accounts on the server