5.openldap设置用户本身修改密码

1. 修改slapd.conf文件

#vim /etc/openldap/slapd.conf
修改下如下内容

access to dn.subtree="ou=People,dc=bawo,dc=cn" attrs=userPassword,shadowLastChange
	by dn="cn=root,dc=liuyao,dc=cn" write
	by self write
	by anonymous auth
	by * read

2. 关闭服务

#service slapd stop

3. 重新生成数据文件

#rm -rf /etc/openldap/slapd.d/
#chown -R ldap:ldap /var/lib/ldap
#chown -R ldap:ldap /etc/openldap/

4. 测试并生成配置文件:

#slaptest  -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
返回config file testing succeeded,则配置成功。
#chown -R ldap:ldap /etc/openldap/slapd.d

5. 重启服务

#service slapd restart