LDAP LDIF Reference |
![]() |
PureTest
5.2 January 2015 |
http://www.pureload.com support@pureload.com |
The LDAP (Lightweight Directory Access Protocol) tasks use the LDAP Data Interchange Format (LDIF) to represent LDAP entries in text form. The slighly simplified version of LDIF used is described in this document.
The basic form of an LDIF entry is:
dn: <distinguished name> <attrdesc>: <attrvalue> <attrdesc>: <attrvalue> ... |
The value may be specified as UTF-8 text.
Multiple attribute values are specified on separate lines, e.g.,
cn: Barbara J Jensen cn: Babs Jensen |
Here is an example of an LDIF entry:
dn: uid=pierre objectClass: organizationalPerson cn: Pierre Tiptoe sn: Tiptoe title: Guru |
To specify data to be modified by the LDAPModifyTask the LDIF data consists of one or more records, each one corresponding to a change, addition, or deletion from the LDAP database. The records are separated by a blank line. Each record has the following format.
The record begins with the type of change being made:
changetype: <[modify|add|delete]> |
Then, the change information itself is given, the format of which depends on what kind of change was specified above. For a changetype of modify, the format is one or more of the following:
add: <attributetype> <attributetype>: <value1> <attributetype>: <value2> ... - |
Or, for a replace modification:
replace: <attributetype> <attributetype>: <value1> <attributetype>: <value2> ... - |
Or, for a delete modification:
delete: <attributetype> - |
If no attributetype lines are given, the entire attribute is to be
deleted.
For a changetype of add, the format is:
<attributetype1>: <value1> <attributetype1>: <value2> ... <attributetypeN>: <value1> <attributetypeN>: <value2> |
For a changetype of delete, no additional information is needed in
the record.
Example:
dn: uid=pierre changetype: modify add: description description: A 1337 Pig - delete: title - replace: cn cn: Pierrovich Tiptoe |