]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapd.8
More for slapschema
[openldap] / doc / man / man8 / slapd.8
1 .TH SLAPD 8C "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2009 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .\" $OpenLDAP$
5 .SH NAME
6 slapd \- Stand-alone LDAP Daemon
7 .SH SYNOPSIS
8 .B LIBEXECDIR/slapd 
9 [\c
10 .BR \-4 | \-6 ]
11 [\c
12 .BR \-T \ { acl \||\| a [ dd ]\||\| auth \||\| c [ at ]\||\| d [ n ]\||\| i [ ndex ]\||\| p [ asswd ]\||\| s [ chema ]\||\| t [ est ]}]
13 [\c
14 .BI \-d \ debug-level\fR]
15 [\c
16 .BI \-f \ slapd-config-file\fR]
17 [\c
18 .BI \-F \ slapd-config-directory\fR]
19 [\c
20 .BI \-h \ URLs\fR]
21 [\c
22 .BI \-n \ service-name\fR]
23 [\c
24 .BI \-s \ syslog-level\fR]
25 [\c
26 .BI \-l \ syslog-local-user\fR]
27 [\c
28 .BI \-o \ option\fR[ = value\fR]]
29 [\c
30 .BI \-r \ directory\fR]
31 [\c
32 .BI \-u \ user\fR]
33 [\c
34 .BI \-g \ group\fR]
35 [\c
36 .BI \-c \ cookie\fR]
37 .SH DESCRIPTION
38 .LP
39 .B Slapd
40 is the stand-alone LDAP daemon. It listens for LDAP connections on
41 any number of ports (default \fB389\fP), responding
42 to the LDAP operations it receives over these connections.
43 .B slapd
44 is typically invoked at boot time, usually out of
45 .BR  /etc/rc.local .
46 Upon startup,
47 .B slapd
48 normally forks and disassociates itself from the invoking tty.
49 If configured in the config file (or config directory),
50 the
51 .B slapd
52 process will print its process ID (see
53 .BR getpid (2))
54 to a 
55 .B .pid
56 file, as well as the command line options during invocation to an
57 .B .args
58 file (see 
59 .BR slapd.conf (5)).
60 If the
61 .B \-d
62 flag is given, even with a zero argument,
63 .B slapd
64 will not fork and disassociate from the invoking tty.
65 .LP
66 See the "OpenLDAP Administrator's Guide" for more details on
67 .BR slapd .
68 .SH OPTIONS
69 .TP
70 .B \-4
71 Listen on IPv4 addresses only.
72 .TP
73 .B \-6
74 Listen on IPv6 addresses only.
75 .TP
76 .BR \-T \ { acl \||\| a [ dd ]\||\| auth \||\| c [ at ]\||\| d [ n ]\||\| i [ ndex ]\||\| p [ asswd ]\||\| s [ chema ]\||\| t [ est ]}
77 Run in Tool mode. The additional argument selects whether to run as
78 .IR slapadd ,
79 .IR slapcat ,
80 .IR slapdn ,
81 .IR slapindex ,
82 .IR slappasswd ,
83 .IR slapschema ,
84 or
85 .I slaptest
86 (\fIslapacl\fP and \fIslapauth\fP need the entire \fBacl\fP and \fBauth\fP
87 option value to be spelled out, as \fBa\fP is reserved to
88 .IR slapadd ).
89 This option should be the first option specified when it is used;
90 any remaining options will be interpreted by the corresponding 
91 slap tool program, according to the respective man pages.
92 Note that these tool programs will usually be symbolic links to
93 .BR slapd .
94 This option is provided for situations where symbolic links 
95 are not provided or not usable.
96 .TP
97 .BI \-d \ debug-level
98 Turn on debugging as defined by
99 .IR debug-level .
100 If this option is specified, even with a zero argument,
101 .B slapd
102 will not fork or disassociate from the invoking terminal.  Some general
103 operation and status messages are printed for any value of \fIdebug-level\fP.
104 \fIdebug-level\fP is taken as a bit string, with each bit corresponding to a
105 different kind of debugging information.  See <ldap_log.h> for details.
106 Comma-separated arrays of friendly names can be specified to select
107 debugging output of the corresponding debugging information.
108 All the names recognized by the \fIloglevel\fP directive 
109 described in \fBslapd.conf\fP(5) are supported.
110 If \fIdebug-level\fP is \fB?\fP, a list of installed debug-levels is printed,
111 and slapd exits.
112
113 Remember that if you turn on packet logging, packets containing bind passwords
114 will be output, so if you redirect the log to a logfile, that file should
115 be read-protected.
116 .TP
117 .BI \-s \ syslog-level
118 This option tells
119 .B slapd
120 at what debug-level debugging statements should be logged to the
121 .BR syslog (8)
122 facility.
123 The value \fIsyslog-level\fP can be set to any value or combination
124 allowed by the \fB\-d\fP switch.
125 Slapd logs all messages selected by \fIsyslog-leveli\fP 
126 at the
127 .BR syslog (3)
128 severity debug-level \fBDEBUG\fP,
129 on the unit specified with \fB\-l\fP.
130 .TP
131 .BI \-n \ service-name
132 Specifies the service name for logging and other purposes.  Defaults
133 to basename of argv[0], i.e.: "slapd".
134 .TP
135 .BI \-l \ syslog-local-user
136 Selects the local user of the
137 .BR syslog (8)
138 facility. Value can be 
139 .BR LOCAL0 , 
140 through
141 .BR LOCAL7 ,
142 as well as
143 .B USER
144 and
145 .BR DAEMON .
146 The default is
147 .BR LOCAL4 .
148 However, this option is only permitted on systems that support
149 local users with the 
150 .BR syslog (8)
151 facility.
152 Logging to syslog(8) occurs at the "DEBUG" severity debug-level.
153 .TP
154 .BI \-f \ slapd-config-file
155 Specifies the slapd configuration file. The default is
156 .BR ETCDIR/slapd.conf .
157 .TP
158 .BI \-F \ slapd-config-directory
159 Specifies the slapd configuration directory. The default is
160 .BR ETCDIR/slapd.d .
161 If both
162 .B \-f
163 and
164 .B \-F
165 are specified, the config file will be read and converted to
166 config directory format and written to the specified directory.
167 If neither option is specified, slapd will attempt to read the
168 default config directory before trying to use the default
169 config file. If a valid config directory exists then the
170 default config file is ignored. All of the slap tools that
171 use the config options observe this same behavior.
172 .TP
173 .BI \-h \ URLlist
174 .B slapd
175 will by default serve
176 .B ldap:///
177 (LDAP over TCP on all interfaces on default LDAP port).  That is, 
178 it will bind using INADDR_ANY and port \fB389\fP.
179 The
180 .B \-h
181 option may be used to specify LDAP (and other scheme) URLs to serve.
182 For example, if slapd is given
183 .BR "\-h \(dqldap://127.0.0.1:9009/ ldaps:/// ldapi:///\(dq" , 
184 it will listen on 127.0.0.1:9009 for LDAP, 0.0.0.0:636 for LDAP over TLS,
185 and LDAP over IPC (Unix domain sockets).  Host 0.0.0.0 represents
186 INADDR_ANY (any interface).
187 A space separated list of URLs is expected.  The URLs should be of
188 the LDAP, LDAPS, or LDAPI schemes, and generally
189 without a DN or other optional parameters (excepting as discussed below).
190 Support for the latter two schemes depends on selected configuration 
191 options.  Hosts may be specified by name or IPv4 and IPv6 address formats.
192 Ports, if specified, must be numeric.  The default ldap:// port is \fB389\fP
193 and the default ldaps:// port is \fB636\fP.
194
195 The listener permissions are indicated by
196 "x\-mod=\-rwxrwxrwx", "x\-mod=0777" or "x\-mod=777", where any 
197 of the "rwx" can be "\-" to suppress the related permission, while any 
198 of the "7" can be any legal octal digit, according to chmod(1).
199 The listeners can take advantage of the "x\-mod"
200 extension to apply rough limitations to operations, e.g. allow read operations
201 ("r", which applies to search and compare), write operations ("w", 
202 which applies to add, delete, modify and modrdn), and execute operations
203 ("x", which means bind is required).
204 "User" permissions apply to authenticated users, while "other" apply
205 to anonymous users; "group" permissions are ignored.
206 For example, "ldap:///????x\-mod=\-rw\-\-\-\-\-\-\-" means that read and write is only allowed
207 for authenticated connections, and bind is required for all operations.
208 This feature is experimental, and requires to be manually enabled
209 at configure time.
210 .TP
211 .BI \-r \ directory
212 Specifies a directory to become the root directory.  slapd will
213 change the current working directory to this directory and
214 then
215 .BR chroot (2)
216 to this directory.  This is done after opening listeners but before
217 reading any configuration file or initializing any backend.  When
218 used as a security mechanism, it should be used in conjunction with
219 .B \-u
220 and
221 .B \-g
222 options.
223 .TP
224 .BI \-u \ user
225 .B slapd
226 will run slapd with the specified user name or id, and that user's
227 supplementary group access list as set with initgroups(3).  The group ID
228 is also changed to this user's gid, unless the \fB\-g\fP option is used to
229 override.  Note when used with
230 .BR \-r ,
231 slapd will use the user database in the change root environment.
232
233 Note that on some systems, running as a non-privileged user will prevent
234 passwd back-ends from accessing the encrypted passwords.  Note also that
235 any shell back-ends will run as the specified non-privileged user.
236 .TP
237 .BI \-g \ group
238 .B slapd
239 will run with the specified group name or id.  Note when used with
240 .BR \-r ,
241 slapd will use the group database in the change root environment.
242 .TP
243 .BI \-c \ cookie
244 This option provides a cookie for the syncrepl replication consumer.
245 The cookie is a comma separated list of \fIname=value\fP pairs.
246 Currently supported syncrepl cookie fields are
247 .BR rid ,
248 .BR sid ,
249 and
250 .BR csn .
251 .B rid
252 identifies a replication thread within the consumer server
253 and is used to find the syncrepl specification in 
254 .BR slapd.conf (5)
255 or
256 .BR slapd\-config (5)
257 having the matching replication identifier in its definition. The
258 .B rid
259 must be provided in order for any other specified values to be used.
260 .B sid
261 is the server id in a multi-master/mirror-mode configuration.
262 .B csn
263 is the commit sequence number received by a previous synchronization
264 and represents the state of the consumer replica content which the
265 syncrepl engine will synchronize to the current provider content.
266 In case of \fImirror-mode\fP or \fImulti-master\fP replication agreement,
267 multiple
268 .B csn
269 values, semicolon separated, can appear.
270 Use only the 
271 .B rid
272 part to force a full reload.
273 .TP
274 .BI \-o \ option\fR[ = value\fR]
275 This option provides a generic means to specify options without the need to reserve
276 a separate letter for them.
277
278 It supports the following options:
279 .RS
280 .TP
281 .BR slp= { on \||\| off \||\| \fIslp-attrs\fP }
282 When SLP support is compiled into slapd, disable it (\fBoff\fP),
283  enable it by registering at SLP DAs without specific SLP attributes (\fBon\fP),
284 or with specific SLP attributes
285 .I slp-attrs
286 that must be an SLP attribute list definition according to the SLP standard.
287
288 For example, \fB"slp=(tree=production),(server-type=OpenLDAP),(server\-version=2.4.15)"\fP
289 registers at SLP DAs with the three SLP attributes tree, server-type and server-version
290 that have the values given above.
291 This allows to specifically query the SLP DAs for LDAP servers holding the
292 .I production
293 tree in case multiple trees are available.
294 .RE
295 .SH EXAMPLES
296 To start 
297 .I slapd
298 and have it fork and detach from the terminal and start serving
299 the LDAP databases defined in the default config file, just type:
300 .LP
301 .nf
302 .ft tt
303         LIBEXECDIR/slapd
304 .ft
305 .fi
306 .LP
307 To start 
308 .B slapd
309 with an alternate configuration file, and turn
310 on voluminous debugging which will be printed on standard error, type:
311 .LP
312 .nf
313 .ft tt
314         LIBEXECDIR/slapd \-f /var/tmp/slapd.conf \-d 255
315 .ft
316 .fi
317 .LP
318 To test whether the configuration file is correct or not, type:
319 .LP
320 .nf
321 .ft tt
322         LIBEXECDIR/slapd \-Tt
323 .ft
324 .fi
325 .LP
326 .SH "SEE ALSO"
327 .BR ldap (3),
328 .BR slapd.conf (5),
329 .BR slapd\-config (5),
330 .BR slapd.access (5),
331 .BR slapacl (8),
332 .BR slapadd (8),
333 .BR slapauth (8),
334 .BR slapcat (8),
335 .BR slapdn (8),
336 .BR slapindex (8),
337 .BR slappasswd (8),
338 .BR slapschema (8),
339 .BR slaptest (8).
340 .LP
341 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
342 .SH BUGS
343 See http://www.openldap.org/its/
344 .SH ACKNOWLEDGEMENTS
345 .so ../Project