]> git.sur5r.net Git - openldap/blob - doc/man/man8/slapd.8
Changes from HEAD for beta
[openldap] / doc / man / man8 / slapd.8
1 .\" $OpenLDAP$
2 .\" Copyright 1998-2003 The OpenLDAP Foundation All Rights Reserved.
3 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
4 .TH SLAPD 8C "RELEASEDATE" "OpenLDAP LDVERSION"
5 .SH NAME
6 slapd \- Stand-alone LDAP Daemon
7 .SH SYNOPSIS
8 .B LIBEXECDIR/slapd 
9 .B [\-[4|6]]
10 .B [\-d debug\-level]
11 .B [\-f slapd\-config\-file]
12 .B [\-h URLs]
13 .B [\-n service\-name] [\-s syslog\-level] [\-l syslog\-local\-user]
14 .B [\-r directory]
15 .B [\-u user] [\-g group] [\-t]
16 .B 
17 .SH DESCRIPTION
18 .LP
19 .B Slapd
20 is the stand-alone LDAP daemon. It listens for LDAP connections on
21 any number of ports (default 389), responding
22 to the LDAP operations it receives over these connections.
23 .B slapd
24 is typically invoked at boot time, usually out of
25 .BR  /etc/rc.local .
26 Upon startup,
27 .B slapd
28 normally forks and disassociates itself from the invoking tty.
29 If configured in
30 .BR ETCDIR/slapd.conf ,
31 the
32 .B slapd
33 process will print its process ID (see
34 .BR getpid (2))
35 to a 
36 .B .pid
37 file, as well as the command line options during invocation to an
38 .B .args
39 file (see 
40 .BR slapd.conf (5)).
41 If the
42 .B \-d
43 flag is given, even with a zero argument,
44 .B slapd
45 will not fork and disassociate from the invoking tty.
46 .LP
47 .B Slapd
48 can be configured to provide replicated service for a database with
49 the help of
50 .BR slurpd ,
51 the standalone LDAP update replication daemon.
52 See
53 .BR slurpd (8)
54 for details.
55 .LP
56 See the "OpenLDAP Administrator's Guide" for more details on
57 .BR slapd .
58 .SH OPTIONS
59 .TP
60 .B \-4
61 Listen on IPv4 addresses only.
62 .TP
63 .B \-6
64 Listen on IPv6 addresses only.
65 .TP
66 .BI \-d " debug\-level"
67 Turn on debugging as defined by
68 .I debug\-level.
69 If this option is specified, even with a zero argument,
70 .B slapd
71 will not fork or disassociate from the invoking terminal.  Some general
72 operation and status messages are printed for any value of \fIdebug\-level\fP.
73 \fIdebug\-level\fP is taken as a bit string, with each bit corresponding to a
74 different kind of debugging information.  See <ldap.h> for details.
75 Remember that if you turn on packet logging, packets containing bind passwords
76 will be output, so if you redirect the log to a logfile, that file should
77 be read-protected.
78 .TP
79 .BI \-s " syslog\-level"
80 This option tells
81 .B slapd
82 at what level debugging statements should be logged to the
83 .BR syslog (8)
84 facility.
85 .TP
86 .BI \-n " service\-name"
87 Specifies the service name for logging and other purposes.  Defaults
88 to basename of argv[0], i.e.: "slapd".
89 .TP
90 .BI \-l " syslog\-local\-user"
91 Selects the local user of the
92 .BR syslog (8)
93 facility. Values can be 
94 .BR LOCAL0 , 
95 .BR LOCAL1 , 
96 and so on, up to 
97 .BR LOCAL7 . 
98 The default is
99 .BR LOCAL4 .
100 However, this option is only permitted on systems that support
101 local users with the 
102 .BR syslog (8)
103 facility.
104 .TP
105 .BI \-f " slapd\-config\-file"
106 Specifies the slapd configuration file. The default is
107 .BR ETCDIR/slapd.conf .
108 .TP
109 .BI \-h " URLlist"
110 .B slapd
111 will by default serve
112 .B ldap:///
113 (LDAP over TCP on all interfaces on default LDAP port).  That is, 
114 it will bind using INADDR_ANY and port 389.
115 The
116 .B \-h
117 option may be used to specify LDAP (and other scheme) URLs to serve.
118 For example, if slapd is given
119 .B "\-h \(dqldap://127.0.0.1:9009/ ldaps:/// ldapi:///\(dq", 
120 It will bind 127.0.0.1:9009 for LDAP, 0.0.0.0:636 for LDAP over TLS,
121 and LDAP over IPC (Unix domain sockets).  Host 0.0.0.0 represents
122 INADDR_ANY.
123 A space separated list of URLs is expected.  The URLs should be of
124 LDAP (ldap://) or LDAP over TLS (ldaps://) or LDAP over IPC (ldapi://)
125 scheme without a DN or other optional parameters, except an experimental
126 extension to indicate the permissions of the underlying listeners.
127 Support for the latter two schemes depends on selected configuration 
128 options.  Hosts may be specified by name or IPv4 and IPv6 address formats.
129 Ports, if specified, must be numeric.  The default ldap:// port is 389
130 and the default ldaps:// port is 636.
131 The socket permissions for LDAP over IPC are indicated by
132 "x-mod=-rwxrwxrwx", "x-mod=0777" or "x-mod=777", where any 
133 of the "rwx" can be "-" to suppress the related permission (note, 
134 however, that sockets only honor the "w" permission), while any 
135 of the "7" can be any legal octal digit, according to chmod(1).
136 While LDAP over IPC requires write permissions on the socket to allow
137 any operation, the other listeners can take advantage of the "x-mod"
138 extension to apply rough limitations to users, e.g. allow read operations
139 ("r", which applies to search and compare), write operations ("w", 
140 which applies to add, delete, modify and modrdn), and execute operations
141 ("x", which means bind is required).
142 "User" permissions apply to bound users, while "other" apply
143 to anonymous users.
144 .TP
145 .BI \-r " directory"
146 Specifies a chroot "jail" directory.  slapd will
147 .BR chdir (2)
148 then
149 .BR chroot (2)
150 to this directory after opening listeners but before reading
151 any configuration file or initializing any backend.
152 .TP
153 .BI \-u " user"
154 .B slapd
155 will run slapd with the specified user name or id, and that user's
156 supplementary group access list as set with initgroups(3).  The group ID
157 is also changed to this user's gid, unless the -g option is used to
158 override.
159 .TP
160 .BI \-g " group"
161 .B slapd
162 will run with the specified group name or id.
163 .LP
164 Note that on some systems, running as a non-privileged user will prevent
165 passwd back-ends from accessing the encrypted passwords.  Note also that
166 any shell back-ends will run as the specified non-privileged user.
167 .TP
168 .BI \-t
169 .B slapd
170 will read the configuration file (the default if none is given with the 
171 \fI\-f\fP switch) and check its syntax, without opening any listener 
172 or database.
173 .SH EXAMPLES
174 To start 
175 .I slapd
176 and have it fork and detach from the terminal and start serving
177 the LDAP databases defined in the default config file, just type:
178 .LP
179 .nf
180 .ft tt
181         LIBEXECDIR/slapd
182 .ft
183 .fi
184 .LP
185 To start 
186 .B slapd
187 with an alternate configuration file, and turn
188 on voluminous debugging which will be printed on standard error, type:
189 .LP
190 .nf
191 .ft tt
192         LIBEXECDIR/slapd -f /var/tmp/slapd.conf -d 255
193 .ft
194 .fi
195 .LP
196 To test whether the configuration file is correct or not, type:
197 .LP
198 .nf
199 .ft tt
200         LIBEXECDIR/slapd -t
201 .ft
202 .fi
203 .LP
204 .SH "SEE ALSO"
205 .BR ldap (3),
206 .BR slapd.conf (5),
207 .BR slapd.access (5),
208 .BR slurpd (8)
209 .LP
210 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/)
211 .SH BUGS
212 See http://www.openldap.org/its/
213 .SH ACKNOWLEDGEMENTS
214 .B OpenLDAP
215 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
216 .B OpenLDAP
217 is derived from University of Michigan LDAP 3.3 Release.