# centos6.8 openldap
https://blog.csdn.net/Nian_Ctrl/article/details/53842250
https://www.cnblogs.com/lemon-le/p/6266921.html
## 基本安装
~~~
yum -y install vim wget git
~~~
## 安装
~~~
yum install openldap*
rpm -qa|grep openldap
~~~
## 配置
### 复制配置文件
~~~
rm -rf /etc/openldap/slapd.d/*
cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf
~~~
### 创建LDAP管理员密码
~~~
[root@ldap openldap]# slappasswd
New password:
Re-enter new password:
{SSHA}llRr/7oFyW0xC7kVCtz34u5m7pA8cUYj
[root@ldap openldap]#
~~~
>111111
>
### 修改slapd.conf文件
cat > /tmp/template.ldif << EOF
dn: dc=linshichun,dc=com
objectclass: dcObject
objectclass: organization
o: Shichun,Inc.
dc: linshichun
dn: ou=People,dc=linshichun,dc=com
objectClass: organizationalUnit
objectClass: top
ou: People
dn: ou=Groups,dc=linshichun,dc=com
objectClass: organizationalUnit
objectClass: top
ou: Groups
dn: cn=root,dc=linshichun,dc=com
objectclass: organizationalRole
cn: root
EOF
ldapadd -c -x -D "cn=root,dc=linshichun,dc=com" -w 111111 -f /tmp/template.ldif