Chapter 2. Creating Directory Entries

The following sections describe the change types in detail.

4.1. Adding an Entry Using LDIF

changetype: add adds an entry to the directory. When you add an entry, make sure to create an entry representing a branch point before you try to create new entries under that branch. That is, to place an entry in a People and a Groups subtree, then create the branch point for those subtrees before creating entries within the subtrees. For example:

dn: dc=example,dc=com

changetype: add

objectclass: top

objectclass: organization

o: example.com

dn: ou=People, dc=example,dc=com

changetype: add

objectclass: top

objectclass: organizationalUnit

ou: People

ou: Marketing

dn: cn=Pete Minsky,ou=People,dc=example,dc=com

changetype: add

objectclass: top

objectclass: person

objectclass: organizationalPerson

objectclass: inetOrgPerson

cn: Pete Minsky

givenName: Pete

sn: Minsky

ou: People

ou: Marketing

uid: pminsky

dn: cn=Sue Jacobs,ou=People,dc=example,dc=com

changetype: add

objectclass: top

objectclass: person

objectclass: organizationalPerson

objectclass: inetOrgPerson

cn: Sue Jacobs

givenName: Sue

sn: Jacobs

ou: People

ou: Marketing

uid: sjacobs

dn: ou=Groups,dc=example,dc=com

changetype: add

objectclass: top

objectclass: organizationalUnit

ou: Groups

dn: cn=Administrators,ou=Groups,dc=example,dc=com

34

Page 54
Image 54
HP UX Red Hat Direry Server Software Adding an Entry Using Ldif, Following sections describe the change types in detail