LDIF Update Statements

A changetype that defines how a specific entry is to be modified (add, delete, modify, modrdn).

• A series of attributes and their changed values.

A change type is required unless ldapmodify is run with the -aparameter. If you specify the -aparameter, then an add operation (changetype: add) is assumed. However, any other change type overrides the -aparameter.

If you specify a modify operation (changetype: modify), a change operation is required that indicates how the entry should be changed.

If you specify changetype: modrdn, change operations are required that specify how the relative distinguished name (RDN) is to be modified. A distinguished name's RDN is the left-most value in the DN. For example, the distinguished name uid=ssarette,dc=example,dc=com has an RDN of uid=ssarette.

The general format of LDIF update statements is as follows:

dn: distinguished_name

changetype: changetype_identifier change_operation_identifier: list_of_attributes

-

change_operation_identifier: list_of_attributes

-

A dash (-) must be used to denote the end of a change operation if subsequent change operations are specified. For example, the following statement adds the telephone number and manager attributes to the entry:

dn: cn=Lisa Jangles,ou=People,dc=example,dc=com

changetype: modify

add: telephonenumber

telephonenumber: (408) 555-2468

-

add: manager

manager: cn=Harry Cruise,ou=People,dc=example,dc=com

In addition, the line continuation operator is a single space. Therefore, the following two statements are identical:

dn: cn=Lisa Jangles,ou=People,dc=example,dc=com

dn: cn=Lisa Jangles, ou=People, dc=example,dc=com

33

Page 53
Image 53
HP UX Red Hat Direry Server Software manual Ldif Update Statements, General format of Ldif update statements is as follows