ldap常用名称解释
1.环境搭建
操作系统:centos6.5 x86_64关闭防火墙、selinux
开启时间同步
# crontab -e
加入
# time sync
*/5 * * * * /usr/sbin/ntpdate 192.168.8.102 >/dev/null 2>&1
# crontab -l
*/5 * * * * /usr/sbin/ntpdate -u 192.168.8.102 >/dev/null 2>&1
配置域名解析:
# echo "192.168.8.43 chinasoft.com" >> /etc/hosts
解决依赖关系
# yum grouplist
Base
Debugging Tools
Performance Tools
Compatibility libraries
Development tools
Dial-up Networking Support
Hardware monitoring utilities
如果缺少组包,需要安装
yum groupinstall -y "Compatibility libraries"
2.安装openldap master
# yum install -y openldap openldap-*
# yum install -y nscd nss-pam-ldapd nss-* pcre pcre*
# rpm -qa | grep openldap*
compat-openldap-2.3.43-2.el6.x86_64
openldap-2.4.40-12.el6.x86_64
openldap-clients-2.4.40-12.el6.x86_64
openldap-servers-sql-2.4.40-12.el6.x86_64
openldap-servers-2.4.40-12.el6.x86_64
openldap-devel-2.4.40-12.el6.x86_64
3.配置slapd.conf文件
# cd /etc/openldap/[root@node5 openldap]# cp /usr/share/openldap-servers/slapd.conf.obsolete slapd.conf
[root@node5 openldap]# cp slapd.conf slapd.conf.bak
[root@node5 openldap]# slappasswd -s chinasoft|sed -e "s#{SSHA}#rootpw\t{SSHA}#g"
rootpw {SSHA}D9+lqUJZVPobp0sZfXl37jE1aVvR2P9K
[root@node5 openldap]# slappasswd -s chinasoft|sed -e "s#{SSHA}#rootpw\t{SSHA}#g">>/etc/openldap/slapd.conf
[root@node5 openldap]# tail -1 slapd.conf
rootpw {SSHA}FvBRnIPqtIi0/u11O2gOfOCrRJr+xMAr
# vim slapd.conf
注释掉一下四行
# database dbb
#suffix "dc=my-domain,dc=com"
#checkpoint 1024 15
#rootdn "cn=Manager,dc=my-domain,dc=com"
添加如下内容
# add start by jack 2016/07/01
database bdb
suffix "dc=chinasoft,dc=com"
rootdn "cn=admin,dc=chinasoft,dc=com"
对比修改是否成功:
# diff slapd.conf.bak slapd.conf
114,117c114,122
< database bdb
< suffix "dc=my-domain,dc=com"
< checkpoi