HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

Table 77 LDIF fields (continued)
DefinitionField
Specifies an object class to use with this entry. The object class identifies the types of
attributes, or schema, allowed and required for the entry. See “Managing the Directory
Schema” (page 427) for information on customizing the schema.
objectClass:
object_class
Specifies a descriptive attribute to use with the entry. The attribute should be defined
either in the schema. See “Managing the Directory Schema” (page 427) for information
on customizing the schema.
attribute_type
Optional. Specifies subtype, language, binary, or pronunciation. Use this tag to identify
the language in which the corresponding attribute value is expressed or whether the
[subtype]
attribute value is binary or a pronunciation of an attribute value. For information on
attribute subtypes, see Adding an attribute subtype” (page 108). For a complete list of
the supported subtypes tags, see Table 86 (page 575).
Specifies the attribute value to be used with the attribute type.attribute_value
NOTE:
The LDIF syntax for representing a change to an entry in the directory is different from the syntax
described in Table 77 (page 547). For information on using LDIF to modify directory entries, see
“Creating Directory Entries” (page 96).
A.2 Continuing lines in LDIF
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.
A.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.
A.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 command. 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
548 LDAP data Interchange Format