Install and configure OpenLDAP in Windows

Source: Internet
Author: User
Tags openldap

 

1.Download and install OpenLDAP for Windows, Current version 2.2.29
: Http://download.bergmans.us/openldap/openldap-2.2.29/openldap-2.2.29-db-4.3.29-openssl-0.9.8a-win32_Setup.exe
Link: http://lucas.bergmans.us/hacks/openldap/
The installation is very simple. Just click Next. Suppose we install it in C:/OpenLDAP.

2.Configure OpenLDAP, Edit the sldap. conf file
1) Open C:/OpenLDAP/sldap. conf and find
Include C:/OpenLDAP/etc/Schema/CORE. schema, add
Include C:/OpenLDAP/etc/Schema/cosine. Schema
Include C:/OpenLDAP/etc/Schema/inetorgperson. Schema
In the following example, you only need to use the above three schemas. Of course, if you want to use them, you can add all the other schemas.
Include C:/OpenLDAP/etc/Schema/CORBA. Schema
Include C:/OpenLDAP/etc/Schema/dyngroup. Schema
Include C:/OpenLDAP/etc/Schema/Java. Schema
Include C:/OpenLDAP/etc/Schema/Misc. Schema
Include C:/OpenLDAP/etc/Schema/NIS. Schema
Include C:/OpenLDAP/etc/Schema/OpenLDAP. Schema

2) In the sldap. conf file, find
Suffix "DC = My-domain, Dc = com"
Rootdn "cn = manager, Dc = My-domain, Dc = com"
Change the two rows
Suffix "DC = example, Dc = com"
Rootdn "cn = manager, Dc = example, Dc = com"

Suffix depends on how it is defined, and the ldif file in the subsequent steps must be defined with it. Note that there is a rootpw secret in this configuration file. This secret is the password for Cn = manager and will be used later. However, here is the plaintext password. You can use the command: slappasswd-H {MD5}-s secret calculates the encrypted password {MD5} xr4ilozq4pcoq3aq0qbuaq = to replace the secret in the configuration.

3.Start OpenLDAP
Run cmd to go to C:/OpenLDAP and run the command slapd-D 1.
You can see that a piece of information is printed in the console. OpenLDAP uses the Berkeley DB database to store directory data by default.

4.Create entries, Edit and import the ldif File
1) Create an ldif (LDAP data interchanged format) file (in plain text format), for example, test. ldif. The file content is as follows:

DN: DC = example, Dc = com

Objectclass: dcobject

Objectclass: Organization

O: Example Company

DC: Example

 

DN: Cn = manager, Dc = example, Dc = com

Objectclass: organizationalrole

CN: Manager

2) run the following command: ldapadd-X-d "cn = manager, Dc = example, Dc = com"-W secret-F test. ldif.
Import organization information and Roles

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.