]> git.sur5r.net Git - openldap/blob - doc/man/man5/ldif.5
2ba94843795f658cef8d84c4dddc07faa195b991
[openldap] / doc / man / man5 / ldif.5
1 .TH LDIF 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2004 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     <attrdesc>: <attrvalue>
21     <attrdesc>: <attrvalue>
22     <attrdesc>:: <base64-encoded-value>
23     <attrdesc>:< <URL>
24     ...
25 .ft
26 .fi
27 .LP
28 The value may be specified as UTF-8 text or as base64 encoded data,
29 or a URI 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=exam
37      ple,dc=com
38 .ft
39 .fi
40 .LP
41 Lines beginning with a sharpe sign ('#') are ignored.
42 .LP
43 Multiple attribute values are specified on separate lines, e.g.,
44 .LP
45 .nf
46 .ft tt
47     cn: Barbara J Jensen
48     cn: Babs Jensen
49 .ft
50 .fi
51 .LP
52 If an value contains a non-printing character, or begins
53 with a space or a colon ':', the <attrtype> is followed by a
54 double colon and the value is encoded in base 64 notation. e.g.,
55 the value " begins with a space" would be encoded like this:
56 .LP
57 .nf
58 .ft tt
59     cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=
60 .ft
61 .fi
62 .LP
63 If the attribute value is located in a file, the <attrtype> is
64 followed by a ':<' and a file: URI.  e.g., the value contained
65 in the file /tmp/value would be listed like this:
66 .LP
67 .nf
68 .ft tt
69     cn:< file:///tmp/value
70 .ft
71 .fi
72 Other URI schemes (ftp,http) may be supported as well.
73 .LP
74 Multiple entries within the same LDIF file are separated by blank
75 lines.
76 .SH EXAMPLE
77 Here is an example of an LDIF file containing three entries.
78 .LP
79 .nf
80 .ft tt
81     dn: cn=Barbara J Jensen,dc=example,dc=com
82     cn: Barbara J Jensen
83     cn: Babs Jensen
84     objectclass: person
85     description:< file:///tmp/babs
86     sn: Jensen
87
88     dn: cn=Bjorn J Jensen,dc=example,dc=com
89     cn: Bjorn J Jensen
90     cn: Bjorn Jensen
91     objectclass: person
92     sn: Jensen
93
94     dn: cn=Jennifer J Jensen,dc=example,dc=com
95     cn: Jennifer J Jensen
96     cn: Jennifer Jensen
97     objectclass: person
98     sn: Jensen
99     jpegPhoto:: /9j/4AAQSkZJRgABAAAAAQABAAD/2wBDABALD
100      A4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkzODdASFxOQ
101      ERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVG
102     ...
103 .ft
104 .fi
105 .LP
106 Notice that the description in Barbara Jensen's entry is
107 read from file:///tmp/babs and the jpegPhoto in Jennifer
108 Jensen's entry is encoded using base 64.
109 .SH SEE ALSO
110 .BR ldap (3),
111 .BR ldapsearch (1),
112 .BR ldapadd (1).
113 .LP
114 "LDAP Data Interchange Format," Good, G., RFC 2849.
115 .SH ACKNOWLEDGEMENTS
116 .B OpenLDAP
117 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
118 .B OpenLDAP
119 is derived from University of Michigan LDAP 3.3 Release.