]> git.sur5r.net Git - openldap/blob - doc/man/man5/ldif.5
Move extern schema_init_done outside of #ifdef SLAPD_SCHEMA_NOT_COMPAT
[openldap] / doc / man / man5 / ldif.5
1 .TH LDIF 5 "22 September 1998" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 ldif \- LDAP Data Interchange Format
7 .SH DESCRIPTION
8 The LDAP Data Interchange Format (LDIF) is used to represent LDAP
9 entries in text form. LDAP tools, such as
10 .BR ldapadd (1)
11 and
12 .BR ldapsearch (1),
13 read and write LDIF.
14 .LP
15 The basic form of an LDIF entry is:
16 .LP
17 .nf
18 .ft tt
19         dn: <distinguished name>
20         <attrtype>: <attrvalue>
21         <attrtype>: <attrvalue>
22         <attrtype>:: <base64-encoded-value>
23         <attrtype>:< <URL>
24         ...
25 .ft
26 .fi
27 .LP
28 The value may be specified as ASCII text or as base64 encoded data,
29 or a URL may be provided to the location of the attribute value.
30 .LP
31 A line may be continued by starting the next line with a single space
32 or tab, e.g.,
33 .LP
34 .nf
35 .ft tt
36         dn: cn=Barbara J Jensen, dc=Open
37          LDAP, dc=org
38 .ft
39 .fi
40 .LP
41 Multiple attribute values are specified on separate lines, e.g.,
42 .LP
43 .nf
44 .ft tt
45         cn: Barbara J Jensen
46         cn: Babs Jensen
47 .ft
48 .fi
49 .LP
50 If an value contains a non-printing character, or begins
51 with a space or a colon ':', the <attrtype> is followed by a
52 double colon and the value is encoded in base 64 notation. e.g.,
53 the value " begins with a space" would be encoded like this:
54 .LP
55 .nf
56 .ft tt
57         cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
58 .ft
59 .fi
60 .LP
61 If the attribute value is located in a file, the <attrtype> is
62 followed by a ':<' and a file:// URL.  e.g., the value contained
63 in the file /tmp/value would be listed like this:
64 .LP
65 .nf
66 .ft tt
67         cn:< file://tmp/value
68 .ft
69 .fi
70 .LP
71 Multiple entries within the same LDIF file are separated by blank
72 lines.
73 .SH EXAMPLE
74 Here is an example of an LDIF file containing three entries.
75 .LP
76 .nf
77 .ft tt
78         dn: cn=Barbara J Jensen, dc=OpenLDAP, dc=Org
79         cn: Barbara J Jensen
80         cn: Babs Jensen
81         objectclass: person
82         description:< file://tmp/barbara
83         sn: Jensen
84
85         dn: cn=Bjorn J Jensen, dc=OpenLDAP, dc=Org
86         cn: Bjorn J Jensen
87         cn: Bjorn Jensen
88         objectclass: person
89         sn: Jensen
90
91         dn: cn=Jennifer J Jensen, dc=OpenLDAP, dc=Org
92         cn: Jennifer J Jensen
93         cn: Jennifer Jensen
94         objectclass: person
95         sn: Jensen
96         jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD
97          A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ
98          ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG
99         ...
100 .ft
101 .fi
102 .LP
103 Notice that the jpegPhoto in Jennifer Jensen's entry is encoded using
104 base 64.
105 .SH SEE ALSO
106 .BR ldap (3),
107 .BR ldapsearch (1),
108 .BR ldapadd (1)
109 .LP
110 "The SLAPD and SLURPD Administrator's Guide"
111 .SH ACKNOWLEDGEMENTS
112 .B      OpenLDAP
113 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
114 .B      OpenLDAP
115 is derived from University of Michigan LDAP 3.3 Release.