1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
| # generate directory manager's password
[root@dlp ~]# slappasswd New password: Re-enter new password: {SSHA}xxxxxxxxxxxxxxxxxxxxxxxx[root@dlp ~]#
[root@dlp ~]# vi chdomain.ldif # replace to your own domain name for "dc=***,dc=***" section # specify the password generated above for "olcRootPW" section dn: olcDatabase={1}monitor,cn=config changetype: modify replace: olcAccess olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read by dn.base="cn=Manager,dc=oneops,dc=com" read by * none
dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcSuffix olcSuffix: dc=oneops,dc=com
dn: olcDatabase={2}hdb,cn=config changetype: modify replace: olcRootDN olcRootDN: cn=Manager,dc=oneops,dc=com
dn: olcDatabase={2}hdb,cn=config changetype: modify add: olcRootPW olcRootPW: {SSHA}XXXXXXXXXXX
dn: olcDatabase={2}hdb,cn=config changetype: modify add: olcAccess olcAccess: {0}to attrs=userPassword,shadowLastChange by dn="cn=Manager,dc=oneops,dc=com" write by anonymous auth by self write by * none olcAccess: {1}to dn.base="" by * read olcAccess: {2}to * by dn="cn=Manager,dc=oneops,dc=com" write by * read
[root@dlp ~]# ldapmodify -Y EXTERNAL -H ldapi:/// -f chdomain.ldif SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 modifying 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"
[root@dlp ~]# vi basedomain.ldif # replace to your own domain name for "dc=***,dc=***" section dn: dc=oneops,dc=com dc: oneops o: oneops objectClass: top objectClass: dcObject objectclass: organization
dn: cn=Manager,dc=oneops,dc=com objectClass: organizationalRole cn: Manager description: Directory Manager
dn: ou=People,dc=oneops,dc=com objectClass: organizationalUnit ou: People
dn: ou=Group,dc=oneops,dc=com objectClass: organizationalUnit ou: Group
[root@dlp ~]# ldapadd -x -D cn=Manager,dc=oneops,dc=com -W -f basedomain.ldif Enter LDAP Password: # directory manager's password adding new entry "dc=oneops,dc=com"
adding new entry "cn=Manager,dc=oneops,dc=com"
adding new entry "ou=People,dc=oneops,dc=com"
adding new entry "ou=Group,dc=oneops,dc=com"
|