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