debian上安装和配置ldap及phpldapadmin
debian下安装和配置ldap及phpldapadmin
1.安装ldap
安装slapd 以及相关ldap工具
#apt-get install slapd ldap-utils
2.编辑配置文件
vim /etc/ldap/slapd.conf?? (个人比较喜欢vim,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/slapd.pid
argsfile??????? /var/run/slapd/slapd.args
loglevel??????? 256
modulepath??? /usr/lib/ldap
moduleload??? back_bdb
sizelimit 500
tool-threads 1
backend??? ??? bdb
checkpoint 512 30
database??????? bdb
suffix????????? "dc=test,dc=net"
rootdn??? ??? "cn=admin,dc=test,dc=net"
rootpw??? ??? {MD5}G0Z6gesdfW+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 to *
??????? by dn="cn=admin,dc=test,dc=net" write
??????? by * read
########################################################
以上红色为要修改的,其中需要添加rootdn和rootpw两行,其中rootpw由
#slappasswd -h {md5}
得到。
修改loglevel为256产生日志文件。
#echo "local4.debug??? /var/log/ldap.log" >> /etc/syslog.conf
将ldap功能打开。
?
3.重启日志和目录服务。
#/etc/init.d/rsyslog restart?? //我的是这样的,有可能每个人的不一样
#/etc/init.d/slapd restart
4.测试是否已经正常运行
#ldapsearch -x -b '' -s? base '(objectclass=*)'
如果看到有相关信息输出就说明openldap已经正常运行了。
5.建立根
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
至此openladp搭建成功。
6.安装IDE,phpldapadmin
如果已配置好lamp环境,推荐使用phpldapadmin对ldap进行管理
#apt-get install phpldapadmin
作个软链接到www目录下
ln -s /usr/share/phpldapadmin /var/www
注意要使用admin登录时,Login DN填入:cn=admin,dc=test,dc=net
?
在地址栏里直接输入:
http://192.168.89.130/phpldapadmin这样就可以直接访问了。
?
LDAP目录结构示意图
?

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Huawei is rolling out software version 5.0.0.100(C00M01) for the Watch GT 5 and the Watch GT 5 Prosmartwatchesglobally. These two smartwatches recently launched in Europe, with the standard model arriving as the company’s cheapest model. This Harmony

Katsuhiro Harada, the Tekken series director, once seriously tried to bring Colonel Sanders into the iconic fighting game. In an interview with TheGamer, Harada revealed that he pitched the idea to KFC Japan, hoping to add the fast-food legend as a g

Earlier in September 2024, Anker's Zolo 140W charger was leaked, and it was a big deal since it was the first-ever wall charger with a display from the company. Now, a new unboxing video from Xiao Li TV on YouTube gives us a first-hand look at the hi

Garmin is ending the month with a new set of stable updates for its latest high-end smartwatches. To recap, the company released System Software 11.64 to combat high battery drain across the Enduro 3, Fenix E and Fenix 8 (curr. $1,099.99 on Amazon).

Xiaomi will shortly launch the Mijia Graphene Oil Heater in China. The company recently ran a successful crowdfunding campaign for the smart home product, hosted on its Youpin platform. According to the page, the device has already started to ship to

Tesla is rolling out the latest Full Self-Driving (Supervised) version 12.5.5 and with it comes the promised Cybertruck FSD option at long last, ten months after the pickup went on sale with the feature included in the Foundation Series trim price. F

The launch of Samsung's long-awaited 'Special Edition' foldable has taken another twist. In recent weeks, rumours about the so-called Galaxy Z Fold Special Edition went rather quiet. Instead, the focus has shifted to the Galaxy S25 series, including

With a history of over one decade, Manjaro is regarded as one of the most user-friendly Linux distros suitable for both beginners and power users, being easy to install and use. Mostly developed in Austria, Germany, and France, this Arch-based distro
