Suffix is dc=sg,dc=com. There is a People sub-suffix and a Roles sub-suffix.
We created the Persons object under the People sub-suffix first. Then assign the Persons to each Role.
A LDIF file was created and ldapadd command was executed:
bash-3.00# /opt/openldap/bin/ldapadd -x -D "cn=Manager,dc=sg,dc=com" -w XXXXXX -f all.ldif
Sample LDIF file:
all.ldifdn: dc=sg,dc=comdc: sgo: sg.comdescription: azlabs openldapobjectClass: topobjectClass: dcObjectobjectClass: organizationdn: cn=Manager,dc=sg,dc=comobjectclass: organizationalRolecn: Managerdescription: LDAP Directory Administratordn: ou=people, dc=sg,dc=comou: peopledescription: All people in organisationobjectclass: topobjectclass: organizationalunitdn: uid=user1,ou=people,dc=sg,dc=comobjectclass: topobjectclass: organizationalPersonobjectclass: inetOrgPersoncn: user1sn: user1uid: user1userpassword: sSmitHmail: user1@sg.comou: ITdn: uid=user2,ou=people,dc=sg,dc=comobjectclass: topobjectclass: organizationalPersonobjectclass: inetOrgPersoncn: user2sn: user2uid: user2userpassword: sSmitHmail: user2@sg.comou: ITdn: uid=user3,ou=people,dc=sg,dc=comobjectclass: topobjectclass: organizationalPersonobjectclass: inetOrgPersoncn: user3sn: user3uid: user3userpassword: sSmitHmail: user3@sg.comou: ITdn: uid=user4,ou=people,dc=sg,dc=comobjectclass: topobjectclass: organizationalPersonobjectclass: inetOrgPersoncn: user4sn: user4uid: user4userpassword: sSmitHmail: user4@sg.comou: ITdn: uid=user5,ou=people,dc=sg,dc=comobjectclass: topobjectclass: organizationalPersonobjectclass: inetOrgPersoncn: user5sn: user5uid: user5userpassword: sSmitHmail: user5@sg.comou: ITdn: ou=Roles,dc=sg,dc=comobjectclass: topobjectclass: organizationalUnitou: Roles# Define an Admin role.dn: cn=Admin,ou=Roles,dc=sg,dc=comobjectClass: topobjectClass: groupOfNamescn: Admindescription: Admin rolemember: uid=user1,ou=People,dc=sg,dc=com# Define an Group1 role.dn: cn=Group1,ou=Roles,dc=sg,dc=comobjectClass: topobjectClass: groupOfNamescn: Group1description: Group1 rolemember: uid=user1,ou=People,dc=sg,dc=commember: uid=user2,ou=People,dc=sg,dc=com# Define an Group2 role.dn: cn=Group2,ou=Roles,dc=sg,dc=comobjectClass: topobjectClass: groupOfNamescn: Group2description: Group2 rolemember: uid=user1,ou=People,dc=sg,dc=commember: uid=user3,ou=People,dc=sg,dc=commember: uid=user4,ou=People,dc=sg,dc=com# Define an Group3 role.dn: cn=Group3,ou=Roles,dc=sg,dc=comobjectClass: topobjectClass: groupOfNamescn: Group3description: Group3 rolemember: uid=user1,ou=People,dc=sg,dc=commember: uid=user5,ou=People,dc=sg,dc=com
No comments:
Post a Comment