Centos: OpenLDAP Configuration

Source: Internet
Author: User
Tags install perl openldap

LDAP can be used for unified user management and Svn, Apache, and Linux users.

yum install openldap-servers openldap-clientsyum install perl-LDAP*

After the installation is complete, edit LDAP. conf

VI/etc/OpenLDAP/ldap. conf # modify the following content: uri ldap: // 127.0.0.1base Dc = My-domain, Dc = com

Initialize the database:

cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.confcp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG

Configure slapd. conf:

suffix        "dc=my-domain,dc=com"checkpoint    1024 15rootdn        "cn=Manager,dc=my-domain,dc=com"rootpw            {SSHA}F8npd/kNMfH+QWBejiw+hnvYhGVbW6p6

The rootpw can be generated by the command.

Note: Do not use spaces in the file to change the password. You can separate them with tabs. Otherwise, the password is incorrect.

Modify directory permissions:

chown -R ldap:ldap /var/lib/ldapchown -R ldap:ldap /etc/openldap/slapd.d

Import the configuration file (for future changes, refer to this step)

rm -rf /etc/openldap/slapd.d/*slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.dchown -R ldap:ldap /etc/openldap/slapd.dservice slapd restart

Import initial value:

# vim init.ldifdn :dc=my-domain,dc=comobjectclass :dcObjectobjectclass :organizationo :my-domain Cop.dc :my-domaindn :cn=Manager,dc=my-domain,dc=comobjectclass :organizationalRolecn :Manager

Import (enter the password of the manager, that is, the rootpw in the preceding step ):

ldapadd -x -D cn=Manager,dc=my-domain,dc=com -W -f  init.ldif

Then, you can install phpldapadmin or LDAP account manager for management. You can use rpm for installation.

Centos: OpenLDAP Configuration

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.