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 ] attrname
Options
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
base64
encoded 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
sn
attribute withsmith
as value, run the following command:
The command generated the following output:ldif sn smith
sn: 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 smith
sn:: c21pdGgNCg==