Adding Attributes To Existing Entries Using Ldif - Red Hat DIRECTORY SERVER 8.0 - ADMINISTRATION Administration Manual

Hide thumbs Also See for DIRECTORY SERVER 8.0 - ADMINISTRATION:
Table of Contents

Advertisement

The specified values are used to entirely replace the attribute's values. If the attribute does not
already exist, it is created. If no replacement value is specified for the attribute, the attribute is
deleted.
• delete: attribute
The specified attribute is deleted. If more than one value of an attribute exists for the entry, then all
values of the attribute are deleted in the entry. To delete just one of many attribute values, specify
the attribute and associated value on the line following the delete change operation.
This section contains the following topics:
Section 2.4.3.1, "Adding Attributes to Existing Entries Using LDIF"
Section 2.4.3.2, "Changing an Attribute Value Using LDIF"
Section 2.4.3.3, "Deleting All Values of an Attribute Using LDIF"
Section 2.4.3.4, "Deleting a Specific Attribute Value Using LDIF"

2.4.3.1. Adding Attributes to Existing Entries Using LDIF

Using changetype: modify with the add operation cam add an attribute and an attribute value to
an entry. For example, the following LDIF update statement adds a telephone number to the entry:
dn: cn=Barney Fife,ou=People,dc=example,dc=com
changetype: modify
add: telephonenumber
telephonenumber: 555-1212
The following example adds two telephone numbers to the entry:
dn: cn=Barney Fife,ou=People,dc=example,dc=com
changetype: modify
add: telephonenumber
telephonenumber: 555-1212
telephonenumber: 555-6789
The following example adds two telephonenumber attributes and a manager attribute to the entry:
dn: cn=Barney Fife,ou=People,dc=example,dc=com
changetype: modify
add: telephonenumber
telephonenumber: 555-1212
telephonenumber: 555-6789
-
add: manager
manager: cn=Sally Nixon,ou=People,dc=example,dc=com
The following example adds a jpeg photograph to the directory. To add this attribute to the directory,
use the -b parameter, which indicates that ldapmodify should read the referenced file for binary
values if the attribute value begins with a slash:
dn: cn=Barney Fife,ou=People,dc=example,dc=com
Modifying an Entry Using LDIF
31

Advertisement

Table of Contents
loading

Table of Contents