Red Hat Directory Server 8.0 Administrator's Guide

In LDIF files, a line can be broken and continued (called folded) by indenting the continued
portion of the line by exactly one space. For example, the following two statements are identical:
dn: cn=Jake Lupinski,dc=example,dc=com
dn: cn=Jake Lup
inski, dc=exa
mple,dc=com
It is not required to break and continue LDIF lines. However, doing so may improve the
readability of the LDIF file. The usual convention is that an LDIF file does not contain more than
78 columns of text.
3. Representing Binary Data
Binary data, such as a JPEG image, is represented in LDIF using one of two methods, standard
LDIF notation or base-64 encoding.
3.1. Standard LDIF Notation
Standard LDIF notation uses the lesser than (<) symbol to indicate that the data are binary. For
example:
jpegphoto: < file:/path/to/photo
With this standard notation, it is not necessary to specify the ldapmodify -b parameter.
However, standard notation requires that the following line be added to the beginning of the
LDIF file or the LDIF update statements:
version: 1
For example:
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
3.2. Base-64 Encoding
Binary data can be converted to base-64, which can be used in LDIF files, for a variety of data,
from images to SSL certificates. Base 64-encoded data are identified by using the :: symbol.
Representing Binary Data
541