]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapd-shell.5
allow "expand" style in peername, sockname, sockurl as well; more sanity checks
[openldap] / doc / man / man5 / slapd-shell.5
1 .TH SLAPD-SHELL 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2004 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapd-shell \- Shell backend to slapd
7 .SH SYNOPSIS
8 ETCDIR/slapd.conf
9 .SH DESCRIPTION
10 The Shell backend to
11 .BR slapd (8)
12 executes external programs to implement operations, and is designed to
13 make it easy to tie an existing database to the
14 .B slapd
15 front-end.
16 .LP
17 This backend is is primarily intended to be used in prototypes.
18 .SH WARNING
19 The
20 .B abandon
21 shell command has been removed since OpenLDAP 2.1.
22 .SH CONFIGURATION
23 These
24 .B slapd.conf
25 options apply to the SHELL backend database.
26 That is, they must follow a "database shell" line and come before any
27 subsequent "backend" or "database" lines.
28 Other database options are described in the
29 .BR slapd.conf (5)
30 manual page.
31 .LP
32 These options specify the pathname and arguments of the program to
33 execute in response to the given LDAP operation.
34 Each option is followed by the input lines that the program receives:
35 .TP
36 .B add      <pathname> <argument>...
37 .nf
38 ADD
39 msgid: <message id>
40 <repeat { "suffix:" <database suffix DN> }>
41 <entry in LDIF format>
42 .fi
43 .TP
44 .B bind     <pathname> <argument>...
45 .nf
46 BIND
47 msgid: <message id>
48 <repeat { "suffix:" <database suffix DN> }>
49 dn: <DN>
50 method: <method number>
51 credlen: <length of <credentials>>
52 cred: <credentials>
53 .fi
54 .TP
55 .B compare  <pathname> <argument>...
56 .nf
57 COMPARE
58 msgid: <message id>
59 <repeat { "suffix:" <database suffix DN> }>
60 dn: <DN>
61 <attribute>: <value>
62 .fi
63 .TP
64 .B delete   <pathname> <argument>...
65 .nf
66 DELETE
67 msgid: <message id>
68 <repeat { "suffix:" <database suffix DN> }>
69 dn: <DN>
70 .fi
71 .TP
72 .B modify   <pathname> <argument>...
73 .nf
74 MODIFY
75 msgid: <message id>
76 <repeat { "suffix:" <database suffix DN> }>
77 dn: <DN>
78 <repeat {
79     <"add"/"delete"/"replace">: <attribute>
80     <repeat { <attribute>: <value> }>
81     -
82 }>
83 .fi
84 .TP
85 .B modrdn   <pathname> <argument>...
86 .nf
87 MODRDN
88 msgid: <message id>
89 <repeat { "suffix:" <database suffix DN> }>
90 dn: <DN>
91 newrdn: <new RDN>
92 deleteoldrdn: <0 or 1>
93 <if new superior is specified: "newSuperior: <DN>">
94 .fi
95 .TP
96 .B search   <pathname> <argument>...
97 .nf
98 SEARCH
99 msgid: <message id>
100 <repeat { "suffix:" <database suffix DN> }>
101 base: <base DN>
102 scope: <0-2, see ldap.h>
103 deref: <0-3, see ldap.h>
104 sizelimit: <size limit>
105 timelimit: <time limit>
106 filter: <filter>
107 attrsonly: <0 or 1>
108 attrs: <"all" or space-separated attribute list>
109 .fi
110 .TP
111 .B unbind   <pathname> <argument>...
112 .nf
113 UNBIND
114 msgid: <message id>
115 <repeat { "suffix:" <database suffix DN> }>
116 dn: <bound DN>
117 .fi
118 .LP
119 Note that you need only supply configuration lines for those commands you
120 want the backend to handle.
121 Operations for which a command is not supplied will be refused with an
122 "unwilling to perform" error.
123 .LP
124 The commands - except \fBunbind\fP - should output:
125 .RS
126 .nf
127 RESULT
128 code: <integer>
129 matched: <matched DN>
130 info: <text>
131 .fi
132 .RE
133 where only RESULT is mandatory.
134 The \fBsearch\fP RESULT should be preceded by the entries in LDIF
135 format, each entry followed by a blank line.
136 Lines starting with `#' or `DEBUG:' are ignored.
137 .SH EXAMPLE
138 There is an example search script in the slapd/back-shell/ directory
139 in the OpenLDAP source tree.
140 .SH LIMITATIONS
141 The shell backend does not support threaded environments.
142 When using the shell backend, 
143 .BR slapd (8)
144 should be built
145 .IR --without-threads .
146 .SH FILES
147 .TP
148 ETCDIR/slapd.conf
149 default slapd configuration file
150 .SH SEE ALSO
151 .BR slapd.conf (5),
152 .BR slapd (8),
153 .BR sh (1).