Install and configure ldap and phpldapadmin on debian

Source: Internet
Author: User
Tags openldap
Install and configure ldap and phpldapadmin1. install ldap to install slapd and related ldap tools # apt-getinstallslapdldap-utils2. edit the configuration file vimetcldapslapd. conf ?? (I prefer vim, but I am not used to vi) ############################ install and configure ldap and phpldapadmin in debian

1. install ldap
Install slapd and related ldap tools
# Apt-get install slapd ldap-utils

2. edit the configuration file
Vim/etc/ldap/slapd. conf ?? (I prefer vim, but I am not used to vi)
######################################## ################
Include ???????? /Etc/ldap/schema/core. schema
Include ???????? /Etc/ldap/schema/cosine. schema
Include ???????? /Etc/ldap/schema/nis. schema
Include ???????? /Etc/ldap/schema/inetorgperson. schema

Pidfile ???????? /Var/run/slapd. pid

Argsfile ??????? /Var/run/slapd. args

Loglevel ??????? 256

Modulepath ??? /Usr/lib/ldap
Moduleload ??? Back_bdb

Si zelimit 500

Tool-threads 1

Backend ??? ??? Bdb
Check Point 512 30


Database ??????? Bdb

Suffix ????????? "Dc = test, dc = net"

Rootdn ??? ??? "Cn = admin, dc = test, dc = net"
Rootpw ??? ??? {MD5} export z6gesdfw + JgkbwKcllGg =

Directory ?????? "/Var/lib/ldap"

Dbconfig set_cachesize 0 2097152 0


Dbconfig set_lk_max_objects 1500
Dbconfig set_lk_max_locks 1500
Dbconfig set_lk_max_lockers 1500

Index ?????????? ObjectClass eq

Lastmod ???????? On


Access to attrs = userPassword, shadowLastChange
??????? By dn = "cn = admin, dc = test, dc = net" write
??????? By anonymous auth
??????? By self write
??????? By * none

Access to dn. base = "" by * read

Access *
??????? By dn = "cn = admin, dc = test, dc = net" write
??????? By * read
######################################## ################

The above red lines are to be modified. you need to add two lines: rootdn and rootpw.
# Slappasswd-h {md5}
.
Modify loglevel to 256 to generate a log file.
# Echo "local4.debug ??? /Var/log/ldap. log ">/etc/syslog. conf
Enable the ldap function.
?

3. restart log and directory service.

#/Etc/init. d/rsyslog restart ?? // This is my case. it may be different for everyone.

#/Etc/init. d/slapd restart

4. test whether the service is running normally.
# Ldapsearch-x-B '-s? Base' (objectclass = *)'
If relevant information is output, openldap is running properly.

5. create a root
Touch base. ldif
######################################## ################
Dn: dc = test, dc = net
ObjectClass: dcobject
ObjectClass: organization
Dc: test
O: test.net
Description: My Test Openldap
######################################## ################
# Ldapadd? -X-D "cn = admin, dc = test, dc = net"-W-f base. ldif
So far, openladp has been set up successfully.

6. install IDE and phpldapadmin
If you have configured the lamp environment, we recommend that you use phpldapadmin to manage ldap.
# Apt-get install phpldapadmin


Make a soft link to the www Directory
Ln-s/usr/share/phpldapadmin/var/www

Note that when you log on with admin, set Login DN to cn = admin, dc = test, dc = net.

?

Enter the following in the address bar:

Http: // 192.168.89.130/phpldapadmin.

?

LDAP directory structure



?

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.