1SLAPD(8C) SLAPD(8C)
2
3
4
6 slapd - Stand-alone LDAP Daemon
7
9 slapd [-4|-6] [-T {acl|a[dd]|auth|c[at]|
10 d[n]|i[ndex]|p[asswd]|s[chema]|t[est]}] [-d debug-level] [-f slapd-con‐
11 fig-file] [-F slapd-config-directory] [-h URLs] [-n service-name]
12 [-s syslog-level] [-l syslog-local-user] [-o option[=value]] [-r direc‐
13 tory] [-u user] [-g group] [-c cookie]
14
16 Slapd is the stand-alone LDAP daemon. It listens for LDAP connections
17 on any number of ports (default 389), responding to the LDAP operations
18 it receives over these connections. slapd is typically invoked at boot
19 time, usually out of /etc/rc.local. Upon startup, slapd normally forks
20 and disassociates itself from the invoking tty. If configured in the
21 config file (or config directory), the slapd process will print its
22 process ID (see getpid(2)) to a .pid file, as well as the command line
23 options during invocation to an .args file (see slapd.conf(5)). If the
24 -d flag is given, even with a zero argument, slapd will not fork and
25 disassociate from the invoking tty.
26
27 See the "OpenLDAP Administrator's Guide" for more details on slapd.
28
30 -4 Listen on IPv4 addresses only.
31
32 -6 Listen on IPv6 addresses only.
33
34 -T tool
35 Run in Tool mode. The tool argument selects whether to run as
36 slapadd, slapcat, slapdn, slapindex, slappasswd, slapschema, or
37 slaptest (slapacl and slapauth need the entire acl and auth
38 option value to be spelled out, as a is reserved to slapadd).
39 This option should be the first option specified when it is
40 used; any remaining options will be interpreted by the corre‐
41 sponding slap tool program, according to the respective man
42 pages. Note that these tool programs will usually be symbolic
43 links to slapd. This option is provided for situations where
44 symbolic links are not provided or not usable.
45
46 -d debug-level
47 Turn on debugging as defined by debug-level. If this option is
48 specified, even with a zero argument, slapd will not fork or
49 disassociate from the invoking terminal. Some general operation
50 and status messages are printed for any value of debug-level.
51 debug-level is taken as a bit string, with each bit correspond‐
52 ing to a different kind of debugging information. See
53 <ldap_log.h> for details. Comma-separated arrays of friendly
54 names can be specified to select debugging output of the corre‐
55 sponding debugging information. All the names recognized by the
56 loglevel directive described in slapd.conf(5) are supported. If
57 debug-level is ?, a list of installed debug-levels is printed,
58 and slapd exits.
59
60 Remember that if you turn on packet logging, packets containing
61 bind passwords will be output, so if you redirect the log to a
62 logfile, that file should be read-protected.
63
64 -s syslog-level
65 This option tells slapd at what debug-level debugging statements
66 should be logged to the syslog(8) facility. The value syslog-
67 level can be set to any value or combination allowed by the -d
68 switch. Slapd logs all messages selected by syslog-leveli at
69 the syslog(3) severity debug-level DEBUG, on the unit specified
70 with -l.
71
72 -n service-name
73 Specifies the service name for logging and other purposes.
74 Defaults to basename of argv[0], i.e.: "slapd".
75
76 -l syslog-local-user
77 Selects the local user of the syslog(8) facility. Value can be
78 LOCAL0, through LOCAL7, as well as USER and DAEMON. The default
79 is LOCAL4. However, this option is only permitted on systems
80 that support local users with the syslog(8) facility. Logging
81 to syslog(8) occurs at the "DEBUG" severity debug-level.
82
83 -f slapd-config-file
84 Specifies the slapd configuration file. The default is
85 /etc/openldap/slapd.conf.
86
87 -F slapd-config-directory
88 Specifies the slapd configuration directory. The default is
89 /etc/openldap/slapd.d. If both -f and -F are specified, the
90 config file will be read and converted to config directory for‐
91 mat and written to the specified directory. If neither option
92 is specified, slapd will attempt to read the default config
93 directory before trying to use the default config file. If a
94 valid config directory exists then the default config file is
95 ignored. All of the slap tools that use the config options
96 observe this same behavior.
97
98 -h URLlist
99 slapd will by default serve ldap:/// (LDAP over TCP on all
100 interfaces on default LDAP port). That is, it will bind using
101 INADDR_ANY and port 389. The -h option may be used to specify
102 LDAP (and other scheme) URLs to serve. For example, if slapd is
103 given -h "ldap://127.0.0.1:9009/ ldaps:/// ldapi:///", it will
104 listen on 127.0.0.1:9009 for LDAP, 0.0.0.0:636 for LDAP over
105 TLS, and LDAP over IPC (Unix domain sockets). Host 0.0.0.0 rep‐
106 resents INADDR_ANY (any interface). A space separated list of
107 URLs is expected. The URLs should be of the LDAP, LDAPS, or
108 LDAPI schemes, and generally without a DN or other optional
109 parameters (excepting as discussed below). Support for the lat‐
110 ter two schemes depends on selected configuration options.
111 Hosts may be specified by name or IPv4 and IPv6 address formats.
112 Ports, if specified, must be numeric. The default ldap:// port
113 is 389 and the default ldaps:// port is 636.
114
115 The listener permissions are indicated by "x-mod=-rwxrwxrwx",
116 "x-mod=0777" or "x-mod=777", where any of the "rwx" can be "-"
117 to suppress the related permission, while any of the "7" can be
118 any legal octal digit, according to chmod(1). The listeners can
119 take advantage of the "x-mod" extension to apply rough limita‐
120 tions to operations, e.g. allow read operations ("r", which
121 applies to search and compare), write operations ("w", which
122 applies to add, delete, modify and modrdn), and execute opera‐
123 tions ("x", which means bind is required). "User" permissions
124 apply to authenticated users, while "other" apply to anonymous
125 users; "group" permissions are ignored. For example,
126 "ldap:///????x-mod=-rw-------" means that read and write is only
127 allowed for authenticated connections, and bind is required for
128 all operations. This feature is experimental, and requires to
129 be manually enabled at configure time.
130
131 -r directory
132 Specifies a directory to become the root directory. slapd will
133 change the current working directory to this directory and then
134 chroot(2) to this directory. This is done after opening listen‐
135 ers but before reading any configuration file or initializing
136 any backend. When used as a security mechanism, it should be
137 used in conjunction with -u and -g options.
138
139 -u user
140 slapd will run slapd with the specified user name or id, and
141 that user's supplementary group access list as set with init‐
142 groups(3). The group ID is also changed to this user's gid,
143 unless the -g option is used to override. Note when used with
144 -r, slapd will use the user database in the change root environ‐
145 ment.
146
147 Note that on some systems, running as a non-privileged user will
148 prevent passwd back-ends from accessing the encrypted passwords.
149 Note also that any shell back-ends will run as the specified
150 non-privileged user.
151
152 -g group
153 slapd will run with the specified group name or id. Note when
154 used with -r, slapd will use the group database in the change
155 root environment.
156
157 -c cookie
158 This option provides a cookie for the syncrepl replication con‐
159 sumer. The cookie is a comma separated list of name=value
160 pairs. Currently supported syncrepl cookie fields are rid, sid,
161 and csn. rid identifies a replication thread within the con‐
162 sumer server and is used to find the syncrepl specification in
163 slapd.conf(5) or slapd-config(5) having the matching replication
164 identifier in its definition. The rid must be provided in order
165 for any other specified values to be used. sid is the server id
166 in a multi-master/mirror-mode configuration. csn is the commit
167 sequence number received by a previous synchronization and rep‐
168 resents the state of the consumer replica content which the syn‐
169 crepl engine will synchronize to the current provider content.
170 In case of mirror-mode or multi-master replication agreement,
171 multiple csn values, semicolon separated, can appear. Use only
172 the rid part to force a full reload.
173
174 -o option[=value]
175 This option provides a generic means to specify options without
176 the need to reserve a separate letter for them.
177
178 It supports the following options:
179
180 slp={on|off|slp-attrs}
181 When SLP support is compiled into slapd, disable it
182 (off),
183 enable it by registering at SLP DAs without specific SLP
184 attributes (on), or with specific SLP attributes slp-
185 attrs that must be an SLP attribute list definition
186 according to the SLP standard.
187
188 For example, "slp=(tree=production),(server-type=OpenL‐
189 DAP),(server-version=2.4.15)" registers at SLP DAs with
190 the three SLP attributes tree, server-type and server-
191 version that have the values given above. This allows to
192 specifically query the SLP DAs for LDAP servers holding
193 the production tree in case multiple trees are available.
194
196 To start slapd and have it fork and detach from the terminal and start
197 serving the LDAP databases defined in the default config file, just
198 type:
199
200 slapd
201
202 To start slapd with an alternate configuration file, and turn on volu‐
203 minous debugging which will be printed on standard error, type:
204
205 slapd -f /var/tmp/slapd.conf -d 255
206
207 To test whether the configuration file is correct or not, type:
208
209 slapd -Tt
210
212 ldap(3), slapd.conf(5), slapd-config(5), slapd.access(5), slapacl(8),
213 slapadd(8), slapauth(8), slapcat(8), slapdn(8), slapindex(8), slap‐
214 passwd(8), slapschema(8), slaptest(8).
215
216 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
217
219 See http://www.openldap.org/its/
220
222 OpenLDAP Software is developed and maintained by The OpenLDAP Project
223 <http://www.openldap.org/>. OpenLDAP Software is derived from Univer‐
224 sity of Michigan LDAP 3.3 Release.
225
226
227
228OpenLDAP 2.4.23 2010/06/30 SLAPD(8C)