CentOS 7 : OpenLDAP : Configure LDAP Server : Serv...
# generate directory manager's password
[root@dlp ~]#
slappasswd
New password:
Re-enter new password:
{SSHA}xxxxxxxxxxxxxxxxxxxxxxxx
# replace to your own domain name for 'dc=***,dc=***' section
# specify the password generated above for 'olcRootPW' section
dn: olcDatabase={1}monitor,cn=configchangetype: modifyreplace: olcAccessolcAccess: {0}to * by dn.base='gidNumber=0 uidNumber=0,cn=peercred,cn=external,cn=auth' read by dn.base='cn=Manager,dc=srv,dc=world' read by * nonedn: olcDatabase={2}hdb,cn=configchangetype: modifyreplace: olcSuffixolcSuffix: dc=srv,dc=worlddn: olcDatabase={2}hdb,cn=configchangetype: modifyreplace: olcRootDNolcRootDN: cn=Manager,dc=srv,dc=worlddn: olcDatabase={2}hdb,cn=configchangetype: modifyadd: olcRootPWolcRootPW: {SSHA}xxxxxxxxxxxxxxxxxxxxxxxxdn: olcDatabase={2}hdb,cn=configchangetype: modifyadd: olcAccessolcAccess: {0}to attrs=userPassword,shadowLastChange by dn='cn=Manager,dc=srv,dc=world' write by anonymous auth by self write by * noneolcAccess: {1}to dn.base='' by * readolcAccess: {2}to * by dn='cn=Manager,dc=srv,dc=world' write by * read
[root@dlp ~]#
ldapmodify -Y EXTERNAL -H ldapi:/// -f chdomain.ldif
SASL/EXTERNAL authentication startedSASL username: gidNumber=0 uidNumber=0,cn=peercred,cn=external,cn=authSASL SSF: 0modifying entry 'olcDatabase={1}monitor,cn=config'modifying entry 'olcDatabase={2}hdb,cn=config'modifying entry 'olcDatabase={2}hdb,cn=config'modifying entry 'olcDatabase={2}hdb,cn=config'
# replace to your own domain name for 'dc=***,dc=***' section
dn: dc=srv,dc=worldobjectClass: topobjectClass: dcObjectobjectclass: organizationo: Server Worlddc: Srvdn: cn=Manager,dc=srv,dc=worldobjectClass: organizationalRolecn: Managerdescription: Directory Managerdn: ou=People,dc=srv,dc=worldobjectClass: organizationalUnitou: Peopledn: ou=Group,dc=srv,dc=worldobjectClass: organizationalUnitou: Group
[root@dlp ~]#
ldapadd -x -D cn=Manager,dc=srv,dc=world -W -f basedomain.ldif
Enter LDAP Password:
# directory manager's password
adding new entry 'dc=srv,dc=world'adding new entry 'cn=Manager,dc=srv,dc=world'adding new entry 'ou=People,dc=srv,dc=world'adding new entry 'ou=Group,dc=srv,dc=world'
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。