安装
yum -y install openldap openldap-servers openldap-clients mod_authz_ldap nss-pam-ldapd python-ldap
配置
rm -rf /etc/openldap/slapd.d/*
/usr/libexec/openldap/convert-config.sh -f /usr/share/openldap-servers/slapd.ldif -F /etc/openldap/slapd.d
rm -rf /var/lib/ldap/DB_CONFIG
cp -av /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG
chown ldap:ldap /var/lib/ldap/DB_CONFIG
systemctl restart slapd
//生成密码
[root@controller ~]# slappasswd
New password:[123456]
Re-enter new password:[123456]
{SSHA}yUKxkSjKTb+F1pCG8zC78xY0D1nM/0NE
实使化:
vi init.ldif
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=openstack,dc=org
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootDN
olcRootDN: cn=Manager,dc=openstack,dc=org
dn: olcDatabase={2}hdb,cn=config
changetype: modify
add: olcRootPW
olcRootPW: {SSHA}yUKxkSjKTb+F1pCG8zC78xY0D1nM/0NE
导入文件
ldapmodify -Y EXTERNAL -H ldapi:/// -f init.ldif
生成域和role
vi domain.ldif
# Domain
dn: dc=openstack,dc=org
objectClass: dcObject
objectClass: organization
dc: openstack
o: Openstack,Inc.
ldapadd -w 123456 -D cn=Manager,dc=openstack,dc=org -f domain.ldif
dn:cn=Manager,dc=openstack,dc=org
密码:123456
安装windows客户端软件Softerra LDAP Administrator
另一个管理工具
阅读(1694) | 评论(0) | 转发(0) |