1 .\" This manpage has been automatically generated by docbook2man
2 .\" from a DocBook document. This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
4 .\" Please send any bug reports, improvements, comments, patches,
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "SMBD" "8" "04 March 2003" "" ""
8 smbd \- server to provide SMB/CIFS services to clients
11 \fBsmbd\fR [ \fB-D\fR ] [ \fB-F\fR ] [ \fB-S\fR ] [ \fB-i\fR ] [ \fB-h\fR ] [ \fB-V\fR ] [ \fB-b\fR ] [ \fB-d <debug level>\fR ] [ \fB-l <log directory>\fR ] [ \fB-p <port number>\fR ] [ \fB-O <socket option>\fR ] [ \fB-s <configuration file>\fR ]
15 This program is part of the Samba suite.
17 \fBsmbd\fR is the server daemon that
18 provides filesharing and printing services to Windows clients.
19 The server provides filespace and printer services to
20 clients using the SMB (or CIFS) protocol. This is compatible
21 with the LanManager protocol, and can service LanManager
22 clients. These include MSCLIENT 3.0 for DOS, Windows for
23 Workgroups, Windows 95/98/ME, Windows NT, Windows 2000,
24 OS/2, DAVE for Macintosh, and smbfs for Linux.
26 An extensive description of the services that the
27 server can provide is given in the man page for the
28 configuration file controlling the attributes of those
29 services (see \fIsmb.conf(5)
30 \fR This man page will not describe the
31 services, but will concentrate on the administrative aspects
32 of running the server.
34 Please note that there are significant security
35 implications to running this server, and the \fIsmb.conf(5)\fR
36 manpage should be regarded as mandatory reading before
37 proceeding with installation.
39 A session is created whenever a client requests one.
40 Each client gets a copy of the server for each session. This
41 copy then services all connections made by the client during
42 that session. When all connections from its client are closed,
43 the copy of the server for that client terminates.
45 The configuration file, and any files that it includes,
46 are automatically reloaded every minute, if they change. You
47 can force a reload by sending a SIGHUP to the server. Reloading
48 the configuration file will not affect connections to any service
49 that is already established. Either the user will have to
50 disconnect from the service, or \fBsmbd\fR killed and restarted.
54 If specified, this parameter causes
55 the server to operate as a daemon. That is, it detaches
56 itself and runs in the background, fielding requests
57 on the appropriate port. Operating the server as a
58 daemon is the recommended way of running \fBsmbd\fR for
59 servers that provide more than casual use file and
60 print services. This switch is assumed if \fBsmbd
61 \fR is executed on the command line of a shell.
64 If specified, this parameter causes
65 the main \fBsmbd\fR process to not daemonize,
66 i.e. double-fork and disassociate with the terminal.
67 Child processes are still created as normal to service
68 each connection request, but the main process does not
69 exit. This operation mode is suitable for running
70 \fBsmbd\fR under process supervisors such
71 as \fBsupervise\fR and \fBsvscan\fR
72 from Daniel J. Bernstein's \fBdaemontools\fR
73 package, or the AIX process monitor.
76 If specified, this parameter causes
77 \fBsmbd\fR to log to standard output rather
81 If this parameter is specified it causes the
82 server to run "interactively", not as a daemon, even if the
83 server is executed on the command line of a shell. Setting this
84 parameter negates the implicit deamon mode when run from the
85 command line. \fBsmbd\fR also logs to standard
86 output, as if the \fB-S\fR parameter had been
90 Prints the help information (usage)
94 Prints the version number for
98 Prints information about how
101 \fB-d <debug level>\fR
102 \fIdebuglevel\fR is an integer
103 from 0 to 10. The default value if this parameter is
104 not specified is zero.
106 The higher this value, the more detail will be
107 logged to the log files about the activities of the
108 server. At level 0, only critical errors and serious
109 warnings will be logged. Level 1 is a reasonable level for
110 day to day running - it generates a small amount of
111 information about operations carried out.
113 Levels above 1 will generate considerable
114 amounts of log data, and should only be used when
115 investigating a problem. Levels above 3 are designed for
116 use only by developers and generate HUGE amounts of log
117 data, most of which is extremely cryptic.
119 Note that specifying this parameter here will
123 \fB-l <log directory>\fR
126 specifies a log directory into which the "log.smbd" log
127 file will be created for informational and debug
128 messages from the running server. The log
129 file generated is never removed by the server although
130 its size may be controlled by the max log size
131 option in the \fI smb.conf(5)\fR file. \fBBeware:\fR
132 If the directory specified does not exist, \fBsmbd\fR
133 will log to the default debug log location defined at compile time.
135 The default log directory is specified at
138 \fB-O <socket options>\fR
139 See the socket options
140 parameter in the \fIsmb.conf(5)
141 \fR file for details.
143 \fB-p <port number>\fR
144 \fIport number\fR is a positive integer
145 value. The default value if this parameter is not
148 This number is the port number that will be
149 used when making connections to the server from client
150 software. The standard (well-known) port number for the
151 SMB over TCP is 139, hence the default. If you wish to
152 run the server as an ordinary user rather than
153 as root, most systems will require you to use a port
154 number greater than 1024 - ask your system administrator
155 for help if you are in this situation.
157 In order for the server to be useful by most
158 clients, should you configure it on a port other
159 than 139, you will require port redirection services
160 on port 139, details of which are outlined in rfc1002.txt
163 This parameter is not normally specified except
164 in the above situation.
166 \fB-s <configuration file>\fR
167 The file specified contains the
168 configuration details required by the server. The
169 information in this file includes server-specific
170 information such as what printcap file to use, as well
171 as descriptions of all the services that the server is
172 to provide. See \fI smb.conf(5)\fR for more information.
173 The default configuration file name is determined at
177 \fB\fI/etc/inetd.conf\fB\fR
178 If the server is to be run by the
179 \fBinetd\fR meta-daemon, this file
180 must contain suitable startup information for the
181 meta-daemon. See the UNIX_INSTALL.html
182 document for details.
185 or whatever initialization script your
188 If running the server as a daemon at startup,
189 this file will need to contain an appropriate startup
190 sequence for the server. See the UNIX_INSTALL.html
191 document for details.
193 \fB\fI/etc/services\fB\fR
194 If running the server via the
195 meta-daemon \fBinetd\fR, this file
196 must contain a mapping of service name (e.g., netbios-ssn)
197 to service port (e.g., 139) and protocol type (e.g., tcp).
198 See the UNIX_INSTALL.html
199 document for details.
201 \fB\fI/usr/local/samba/lib/smb.conf\fB\fR
202 This is the default location of the
204 server configuration file. Other common places that systems
205 install this file are \fI/usr/samba/lib/smb.conf\fR
206 and \fI/etc/smb.conf\fR.
208 This file describes all the services the server
209 is to make available to clients. See \fIsmb.conf(5)\fR for more information.
212 On some systems \fBsmbd\fR cannot change uid back
213 to root after a setuid() call. Such systems are called
214 trapdoor uid systems. If you have such a system,
215 you will be unable to connect from a client (such as a PC) as
216 two different users at once. Attempts to connect the
217 second user will result in access denied or
219 .SH "ENVIRONMENT VARIABLES"
222 If no printer name is specified to
223 printable services, most systems will use the value of
224 this variable (or lp if this variable is
225 not defined) as the name of the printer to use. This
226 is not specific to the server, however.
227 .SH "PAM INTERACTION"
229 Samba uses PAM for authentication (when presented with a plaintext
230 password), for account checking (is this account disabled?) and for
231 session management. The degree too which samba supports PAM is restricted
232 by the limitations of the SMB protocol and the
234 smb.conf paramater. When this is set, the following restrictions apply:
237 \fBAccount Validation\fR: All accesses to a
238 samba server are checked
239 against PAM to see if the account is vaild, not disabled and is permitted to
240 login at this time. This also applies to encrypted logins.
243 \fBSession Management\fR: When not using share
244 level secuirty, users must pass PAM's session checks before access
245 is granted. Note however, that this is bypassed in share level secuirty.
246 Note also that some older pam configuration files may need a line
247 added for session support.
250 This man page is correct for version 3.0 of
254 Most diagnostics issued by the server are logged
255 in a specified log file. The log file name is specified
256 at compile time, but may be overridden on the command line.
258 The number and nature of diagnostics available depends
259 on the debug level used by the server. If you have problems, set
260 the debug level to 3 and peruse the log files.
262 Most messages are reasonably self-explanatory. Unfortunately,
263 at the time this man page was created, there are too many diagnostics
264 available in the source code to warrant describing each and every
265 diagnostic. At this stage your best bet is still to grep the
266 source code and inspect the conditions that gave rise to the
267 diagnostics you are seeing.
270 Sending the \fBsmbd\fR a SIGHUP will cause it to
271 reload its \fIsmb.conf\fR configuration
272 file within a short period of time.
274 To shut down a user's \fBsmbd\fR process it is recommended
275 that \fBSIGKILL (-9)\fR \fBNOT\fR
276 be used, except as a last resort, as this may leave the shared
277 memory area in an inconsistent state. The safe way to terminate
278 an \fBsmbd\fR is to send it a SIGTERM (-15) signal and wait for
279 it to die on its own.
281 The debug log level of \fBsmbd\fR may be raised
282 or lowered using \fBsmbcontrol(1)
283 \fR program (SIGUSR[1|2] signals are no longer used in
284 Samba 2.2). This is to allow transient problems to be diagnosed,
285 whilst still running at a normally low log level.
287 Note that as the signal handlers send a debug write,
288 they are not re-entrant in \fBsmbd\fR. This you should wait until
289 \fBsmbd\fR is in a state of waiting for an incoming SMB before
290 issuing them. It is possible to make the signal handlers safe
291 by un-blocking the signals before the select call and re-blocking
292 them after, however this would affect performance.
295 hosts_access(5), \fBinetd(8)\fR,
299 \fR and the Internet RFC's
300 \fIrfc1001.txt\fR, \fIrfc1002.txt\fR.
301 In addition the CIFS (formerly SMB) specification is available
302 as a link from the Web page
303 http://samba.org/cifs/ <URL:http://samba.org/cifs/>.
306 The original Samba software and related utilities
307 were created by Andrew Tridgell. Samba is now developed
308 by the Samba Team as an Open Source project similar
309 to the way the Linux kernel is developed.
311 The original Samba man pages were written by Karl Auer.
312 The man page sources were converted to YODL format (another
313 excellent piece of Open Source software, available at
314 ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0
315 release by Jeremy Allison. The conversion to DocBook for
316 Samba 2.2 was done by Gerald Carter