Install OpenLDAP in Ubuntu

Source: Internet
Author: User
Tags ldap openldap
Ubuntu's source contains OpenLDAP, but does not call this name, execute the following command to install $ sudoapt-getinstallslapdldap-utilsdb4.6-util2. create the root user password $ slappasswd enter the password twice according to the on-screen prompt and an encrypted string will be obtained $ ldapadd-x-v-f ~ /Source/ldap/OpenLDAP/ldf/admin. ldi

The Ubuntu source contains OpenLDAP, but it is not called. You can run the following command to install

$ Sudo apt-get install slapd ldap-utils db4.6-util

2. Create the root user password

$ Slappasswd

Enter the password twice as prompted and an encrypted string is displayed.

$ Ldapadd-x-v-f ~ /Source/ldap/OpenLDAP/ldf/admin. ldif

3. Set ldap Information

Edit the/etc/ldap/slapd. conf file. modify some information as follows:

Suffix "dc = jimhome, dc = com"

Directory "/var/lib/ldap"

Rootdn "cn = admin, dc = jimhome, dc = com"

Rootpw {SSHA} HldmdEL0M8EGT1wHM1XOXmAbtBe3CzXx

Access to attrs = userPassword, shadowLastChange

By dn = "cn = admin, dc = jimhome, dc = com" write

By anonymous auth

By self write

By * none

Access *

By dn = "cn = admin, dc = jimhome, dc = com" write

By * read

3. Restart the LDAP daemon.

$ Sudo/etc/init. d/slapd restart

4. Import the root user ldif File

Create a file and use the nano command.

$ Nano admin. ldif

Enter the following information:

Dn: dc = jimhome, dc = com

ObjectClass: dcObject

ObjectClass: organization

Dc: jimhome

O: jim 'home pc

Note: the format of the ldif file is very strict. It cannot be a space error. It is abnormal.

5. Import the ldif File

$ Ldapadd-x-v-f ~ /Source/ldap/OpenLDAP/ldf/admin. ldif

Note that the path must be an absolute path; otherwise, ldafadd fails to be imported.

If you think the command line is troublesome, you can use tools to import it. For example, apache directory studio is good because it is based on eclipse and has cross-platform features.

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.