]> git.sur5r.net Git - openldap/blob - doc/man/man5/ldif.5
s/ldif2ldbm/slapadd/ and similiar changes
[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. LDAP tools, such as
7 .BR ldapadd (1)
8 and
9 .BR ldapsearch (1),
10 read and write LDIF.
11 .LP
12 The basic form of an LDIF entry is:
13 .LP
14 .nf
15 .ft tt
16         dn: <distinguished name>
17         <attrtype>: <attrvalue>
18         <attrtype>: <attrvalue>
19         <attrtype>:: <base64-encoded-value>
20         <attrtype>:< <URL>
21         ...
22 .ft
23 .fi
24 .LP
25 The value may be specified as ASCII text or as base64 encoded data,
26 or a URL may be provided to the location of the attribute value.
27 .LP
28 A line may be continued by starting the next line with a single space
29 or tab, e.g.,
30 .LP
31 .nf
32 .ft tt
33         dn: cn=Barbara J Jensen, dc=Open
34          LDAP, dc=org
35 .ft
36 .fi
37 .LP
38 Multiple attribute values are specified on separate lines, e.g.,
39 .LP
40 .nf
41 .ft tt
42         cn: Barbara J Jensen
43         cn: Babs Jensen
44 .ft
45 .fi
46 .LP
47 If an value contains a non-printing character, or begins
48 with a space or a colon ':', the <attrtype> is followed by a
49 double colon and the value is encoded in base 64 notation. e.g.,
50 the value " begins with a space" would be encoded like this:
51 .LP
52 .nf
53 .ft tt
54         cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
55 .ft
56 .fi
57 .LP
58 If the attribute value is located in a file, the <attrtype> is
59 followed by a ':<' and a file:// URL.  e.g., the value contained
60 in the file /tmp/value would be listed like this:
61 .LP
62 .nf
63 .ft tt
64         cn:< file://tmp/value
65 .ft
66 .fi
67 .LP
68 Multiple entries within the same LDIF file are separated by blank
69 lines.
70 .SH EXAMPLE
71 Here is an example of an LDIF file containing three entries.
72 .LP
73 .nf
74 .ft tt
75         dn: cn=Barbara J Jensen, dc=OpenLDAP, dc=Org
76         cn: Barbara J Jensen
77         cn: Babs Jensen
78         objectclass: person
79         description:< file://tmp/barbara
80         sn: Jensen
81
82         dn: cn=Bjorn J Jensen, dc=OpenLDAP, dc=Org
83         cn: Bjorn J Jensen
84         cn: Bjorn Jensen
85         objectclass: person
86         sn: Jensen
87
88         dn: cn=Jennifer J Jensen, dc=OpenLDAP, dc=Org
89         cn: Jennifer J Jensen
90         cn: Jennifer Jensen
91         objectclass: person
92         sn: Jensen
93         jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD
94          A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ
95          ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG
96         ...
97 .ft
98 .fi
99 .LP
100 Notice that the jpegPhoto in Jennifer Jensen's entry is encoded using
101 base 64.
102 .SH SEE ALSO
103 .BR ldap (3),
104 .BR ldapsearch (1),
105 .BR ldapadd (1)
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.