LDIF Update Statements
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.
For example, the following LDIF update statement deletes all instances of the
telephonenumber
appears in the entry:
dn: cn=Barney Fife,ou=People,dc=example,dc=com
changetype: modify
delete: telephonenumber
If you want to delete just a specific instance of the
you simply delete that specific attribute value. The following section describes how
to do this.
Deleting a Specific Attribute Value Using LDIF
Use
changetype:modify
from an entry.
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 delete the 555-1212 telephone number from this entry, use the following LDIF
update statement:
dn: cn=Barney Fife,ou=People,dc=example,dc=com
changetype: modify
delete: telephonenumber
telephonenumber: 555-1212
70
Netscape Directory Server Administrator's Guide • August 2002
with the delete operation to delete an attribute from an
attribute from the entry, regardless of how many times it
with the
delete
telephonenumber
operation to delete an attribute value
attribute, then
Need help?
Do you have a question about the NETSCAPE DIRECTORY SERVER 6.1 - ADMINISTRATOR and is the answer not in the manual?
Questions and answers