Modifying an Entry Using LDIF
31
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
Содержание DIRECTORY SERVER 8.0
Страница 18: ...xviii ...
Страница 29: ...Configuring the Directory Manager 11 6 Enter the new password and confirm it 7 Click Save ...
Страница 30: ...12 ...
Страница 112: ...94 ...
Страница 128: ...110 ...
Страница 190: ...Chapter 6 Managing Access Control 172 4 Click New to open the Access Control Editor ...
Страница 224: ...206 ...
Страница 324: ...306 ...
Страница 334: ...316 ...
Страница 358: ...340 ...
Страница 410: ...392 ...
Страница 420: ...402 ...
Страница 444: ...426 ...
Страница 454: ...436 ...
Страница 464: ...446 ...
Страница 484: ...466 ...
Страница 512: ...494 ...
Страница 522: ...504 ...