Changing An Attribute Value Using Ldif; Deleting All Values Of An Attribute Using Ldif - Netscape DIRECTORY SERVER 6.01 - ADMINISTRATOR Administrator's Manual

Table of Contents

Advertisement

Changing an Attribute Value Using LDIF

Use
changetype:modify
attribute in an entry.
For example, the following LDIF update statement changes Barney's manager from
Sally Nixon to Wally Hensford:
dn: cn=Barney Fife,ou=People,dc=example,dc=com
changetype: modify
replace: manager
manager: cn=Wally Hensford, ou=People, dc=example,dc=com
If the entry has multiple instances of the attribute, then to change one of the
attribute values, you must delete the attribute value that you want to change, and
then add the replacement value. For example, consider the following entry:
cn=Barney Fife,ou=People,dc=example,dc=com
objectClass: inetOrgPerson
cn: Barney Fife
sn: Fife
telephonenumber: 555-1212
telephonenumber: 555-5678
To change the telephone number 555-1212 to 555-4321, use the following LDIF
update statement:
dn: cn=Barney Fife,ou=People,dc=example,dc=com
changetype: modify
delete: telephonenumber
telephonenumber: 555-1212
-
add: telephonenumber
telephonenumber: 555-4321
Barney's entry is now as follows:
cn=Barney Fife,ou=People,dc=example,dc=com
objectClass: inetOrgPerson
cn: Barney Fife
sn: Fife
telephonenumber: 555-5678
telephonenumber: 555-4321

Deleting All Values of an Attribute Using LDIF

Use
changetype:modify
entry. If the entry has more than one instance of the attribute, you must indicate
which of the attributes you want to delete.
with the replace operation to change all values of an
with the delete operation to delete an attribute from an
LDIF Update Statements
Chapter 2
Creating Directory Entries
65

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 6.01

Table of Contents