ldif
Use the ldif command to convert arbitrary data values to LDAP data interchange format (LDIF).
Description
The ldif command is a shell-accessible tool that converts arbitrary data values to LDIF. The command reads values from standard input and produces entries appropriate for use in an LDIF file.
Synopsis
ldif [-b ] attrnameOptions
The ldif command takes the following parameters. All values are case-sensitive.- -b
- Specifies the value is a single raw binary value. Output is a
base64encoded value. - attrname
- Specifies the attribute name for which values to convert. If the -b parameter is not specified, the command interprets each line of standard input to be a separate value of the attribute.
Examples
- Example 1:
- To create the LDIF format for the
snattribute withsmithas value, run the following command:
The command generated the following output:ldif sn smithsn: smith - Example 2:
- To create binary value with the ldif command,
use the -b parameter. Run the following command
to generate the binary value:
On Windows™ systems, press Ctrl+Z, and on UNIX™ based systems, press Ctrl+D to generate the following output:ldif -b sn smithsn:: c21pdGgNCg==