]> git.sur5r.net Git - openldap/blob - doc/man/man5/ldif.5
1a81714bef2b2500dd6aedfc8ad9a31e7c3f9f3a
[openldap] / doc / man / man5 / ldif.5
1 .TH LDIF 5 "22 September 1998" "OpenLDAP LDVERSION"
2 .SH NAME
3 ldif \- LDAP Data Interchange Format
4 .SH DESCRIPTION
5 The LDAP Data Interchange Format (LDIF) is used to represent LDAP
6 entries in text form. The
7 .BR ldif2ldbm (8)
8 tools can be used to convert from LDIF format to the LDBM format
9 used by
10 .BR slapd (8).
11 The
12 .BR ldbmcat (8)
13 tool can be used to do the reverse conversion. See "The SLAPD and
14 SLURPD Administrator's Guide" for more information on this format and
15 the conversion tools.
16 .LP
17 The basic form of an LDIF entry is:
18 .LP
19 .nf
20 .ft tt
21         [<id>]
22         dn: <distinguished name>
23         <attrtype>: <attrvalue>
24         <attrtype>: <attrvalue>
25         ...
26 .ft
27 .fi
28 .LP
29 where <id> is the optional entry ID (a positive decimal number).
30 Normally, you would not supply the <id>, allowing the database creation
31 tools to do that for you. The
32 .BR ldbmcat (8)
33 program, however, produces an LDIF format that includes <id> so that
34 new indexes created will be consistent with the existing database.  A
35 line may be continued by starting the next line with a single space or
36 tab character, e.g.,
37 .LP
38 .nf
39 .ft tt
40         dn: cn=Barbara J Jensen, o=University of Michi
41          gan, c=US
42 .ft
43 .fi
44 .LP
45 Multiple attribute values are specified on separate lines, e.g.,
46 .LP
47 .nf
48 .ft tt
49         cn: Barbara J Jensen
50         cn: Babs Jensen
51 .ft
52 .fi
53 .LP
54 If an <attrvalue> contains a non-printing character, or begins with a
55 space or a colon ':', the <attrtype> is followed by a double colon and
56 the value is encoded in base 64 notation. e.g., the value " begins with
57 a space" would be encoded like this:
58 .LP
59 .nf
60 .ft tt
61         cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
62 .ft
63 .fi
64 .LP
65 Multiple entries within the same LDIF file are separated by blank
66 lines.
67 .SH EXAMPLE
68 Here is an example of an LDIF file containing three entries.
69 .LP
70 .nf
71 .ft tt
72         dn: cn=Barbara J Jensen, o=University of Michi
73          gan, c=US
74         cn: Barbara J Jensen
75         cn: Babs Jensen
76         objectclass: person
77         sn: Jensen
78
79         dn: cn=Bjorn J Jensen, o=University of Michi
80          gan, c=US
81         cn: Bjorn J Jensen
82         cn: Bjorn Jensen
83         objectclass: person
84         sn: Jensen
85
86         dn: cn=Jennifer J Jensen, o=University of Michi
87          gan, c=US
88         cn: Jennifer J Jensen
89         cn: Jennifer Jensen
90         objectclass: person
91         sn: Jensen
92         jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD
93          A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ
94          ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG
95         ...
96 .ft
97 .fi
98 .LP
99 Notice that the jpegPhoto in Jennifer Jensen's entry is encoded using
100 base 64.
101 .SH SEE ALSO
102 .BR ldap (3),
103 .BR slapd (8),
104 .BR ldif2ldbm (8),
105 .BR ldbmcat (8)
106 .LP
107 "The SLAPD and SLURPD Administrator's Guide"
108 .SH ACKNOWLEDGEMENTS
109 .B      OpenLDAP
110 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
111 .B      OpenLDAP
112 is derived from University of Michigan LDAP 3.3 Release.