Detailed steps for building an ldap server in linux

Source: Internet
Author: User
Tags openldap
This article describes how to build an ldap server in linux. For more information, see

The establishment of the original server such as ldap is complicated, and it is also required by CE (the establishment of the client ).

1. install the openldap-servers software package

2. view the location where the ldap template file is stored:

3. copy the ldap template file to the configuration file directory and change the file name to slapd. conf.

4. delete the original files under the/etc/openldap directory and keep these files. note: In the past, the schema files were deleted and three files were left, however, if I delete the schema service during the test, it will fail.

5. modify the permissions of the slapd. conf file:

6. modify the sldap. conf configuration file as follows: (if red is configured, the configuration file is OK, but none of the files are commented out)


Copy codeThe code is as follows:
Include/etc/openldap/schema/corba. schema
Include/etc/openldap/schema/core. schema
Include/etc/openldap/schema/cosine. schema
Include/etc/openldap/schema/duaconf. schema
Include/etc/openldap/schema/dyngroup. schema
Include/etc/openldap/schema/inetorgperson. schema
Include/etc/openldap/schema/java. schema
Include/etc/openldap/schema/misc. schema
Include/etc/openldap/schema/nis. schema
Include/etc/openldap/schema/openldap. schema
Include/etc/openldap/schema/ppolicy. schema
Include/etc/openldap/schema/collective. schema
Allow bind_v2
Pidfile/var/run/openldap/slapd. pid argsfile/var/run/openldap/slapd. args
Database bdb suffix "dc = example, dc = com" checkpoint 1024 15 rootdn
"Cn = Manager, dc = example, dc = com"
Rootpw redhat
Directory/var/lib/ldap
Index objectClass eq, pres
Index ou, cn, mail, surname, givenname eq, pres, sub
Index uidNumber, gidNumber, loginShell eq, pres
Index uid, memberUid eq, pres, sub
Database monitor
Access to * by dn. exact = "cn = Manager, dc = example, dc = com" read by * none

7. restart the ldap server:

8. create an ldap user directory:

9. edit a script to automatically create an ldap user:

10. execute this script to add users:

11. export ldap users and groups respectively to a file: (only groups are used in this example.) users are in,/etc/passwd

12. install the software package:

13. Compile the ldap user group file in its directory:

14. modify the migrate_common.ph file:

15. execute the./migrate_base.pl file and export it to the bottom of a directory for modification. only three basic configurations are left:


 

16, respectively. /migrate_passwd.pl. /migrate_group.pl compile the ldap users and group files we have exported:/mnt/user/mnt/group are ldap users and group files exported from/etc/passwd/etc/group respectively.

/Date/user. ldif/date/group. ldif is the compiled file that should end with ldif.

17. check the files compiled in/date:

18. add ldap users and groups:

First, the system prompts you to enter the password, and then the password is added successfully.

Another user must first execute the base. ldif file, which is the most basic 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.