Changing An Attribute Value Using Ldif - Red Hat DIRECTORY SERVER 7.1 - ADMINISTRATOR Administrator's Manual

Table of Contents

Advertisement

The following example adds a
can be displayed by Directory Server Gateway. In order to add this attribute to the
directory, you must use the
should read the referenced file for binary values if the attribute value
ldapmodify
begins with a slash:
dn: cn=Barney Fife,ou=People,dc=example,dc=com
changetype: modify
add: jpegphoto
jpegphoto: /path/to/photo
You can also add a
jpeg
LDIF notation:
jpegphoto: < file:/path/to/photo
If you use this standard notation, you do not need to specify the
parameter. However, you must add the following line to the beginning of your
LDIF file or your LDIF update statements:
version:1
For example, you could use the following
prompt> ldapmodify -D userDN -w user_password
>version: 1
>dn: cn=Barney Fife,ou=People,dc=example,dc=com
>changetype: modify
>add: userCertificate
>userCertificate;binary:< file: BarneysCert
NOTE
You can use the standard LDIF notation only with the
command, not with other command-line utilities.

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
photograph to the directory. The
jpeg
parameter, which indicates that
ldapmodify -b
photograph to the directory using the following standard
ldapmodify
with the replace operation to change all values of an
LDIF Update Statements
jpeg
ldapmodify -b
command:
ldapmodify
Chapter 2
Creating Directory Entries
photo
69

Advertisement

Table of Contents
loading

This manual is also suitable for:

Directory server 7.1

Table of Contents