We changed 'net' so change the torture tests that use it.
[Samba.git] / docs / htmldocs / smbd.8.html
blobafd70cbe034ceeb5073d798eb58238f40f17c2f9
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >smbd</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"></HEAD
9 ><BODY
10 CLASS="REFENTRY"
11 BGCOLOR="#FFFFFF"
12 TEXT="#000000"
13 LINK="#0000FF"
14 VLINK="#840084"
15 ALINK="#0000FF"
16 ><H1
17 ><A
18 NAME="SMBD.8"
19 ></A
20 >smbd</H1
21 ><DIV
22 CLASS="REFNAMEDIV"
23 ><A
24 NAME="AEN5"
25 ></A
26 ><H2
27 >Name</H2
28 >smbd&nbsp;--&nbsp;server to provide SMB/CIFS services to clients</DIV
29 ><DIV
30 CLASS="REFSYNOPSISDIV"
31 ><A
32 NAME="AEN8"
33 ></A
34 ><H2
35 >Synopsis</H2
36 ><P
37 ><B
38 CLASS="COMMAND"
39 >smbd</B
40 > [-D] [-F] [-S] [-i] [-h] [-V] [-b] [-d &#60;debug level&#62;] [-l &#60;log directory&#62;] [-p &#60;port number&#62;] [-O &#60;socket option&#62;] [-s &#60;configuration file&#62;]</P
41 ></DIV
42 ><DIV
43 CLASS="REFSECT1"
44 ><A
45 NAME="AEN23"
46 ></A
47 ><H2
48 >DESCRIPTION</H2
49 ><P
50 >This program is part of the <SPAN
51 CLASS="CITEREFENTRY"
52 ><SPAN
53 CLASS="REFENTRYTITLE"
54 >Samba</SPAN
55 >(7)</SPAN
56 > suite.</P
57 ><P
58 ><B
59 CLASS="COMMAND"
60 >smbd</B
61 > is the server daemon that
62 provides filesharing and printing services to Windows clients.
63 The server provides filespace and printer services to
64 clients using the SMB (or CIFS) protocol. This is compatible
65 with the LanManager protocol, and can service LanManager
66 clients. These include MSCLIENT 3.0 for DOS, Windows for
67 Workgroups, Windows 95/98/ME, Windows NT, Windows 2000,
68 OS/2, DAVE for Macintosh, and smbfs for Linux.</P
69 ><P
70 >An extensive description of the services that the
71 server can provide is given in the man page for the
72 configuration file controlling the attributes of those
73 services (see <SPAN
74 CLASS="CITEREFENTRY"
75 ><SPAN
76 CLASS="REFENTRYTITLE"
77 >smb.conf</SPAN
78 >(5)</SPAN
79 >. This man page will not describe the
80 services, but will concentrate on the administrative aspects
81 of running the server.</P
82 ><P
83 >Please note that there are significant security
84 implications to running this server, and the <SPAN
85 CLASS="CITEREFENTRY"
86 ><SPAN
87 CLASS="REFENTRYTITLE"
88 >smb.conf</SPAN
89 >(5)</SPAN
90 > manual page should be regarded as mandatory reading before
91 proceeding with installation.</P
92 ><P
93 >A session is created whenever a client requests one.
94 Each client gets a copy of the server for each session. This
95 copy then services all connections made by the client during
96 that session. When all connections from its client are closed,
97 the copy of the server for that client terminates.</P
98 ><P
99 >The configuration file, and any files that it includes,
100 are automatically reloaded every minute, if they change. You
101 can force a reload by sending a SIGHUP to the server. Reloading
102 the configuration file will not affect connections to any service
103 that is already established. Either the user will have to
104 disconnect from the service, or <B
105 CLASS="COMMAND"
106 >smbd</B
107 > killed and restarted.</P
108 ></DIV
109 ><DIV
110 CLASS="REFSECT1"
112 NAME="AEN42"
113 ></A
114 ><H2
115 >OPTIONS</H2
117 ></P
118 ><DIV
119 CLASS="VARIABLELIST"
120 ><DL
121 ><DT
122 >-D</DT
123 ><DD
125 >If specified, this parameter causes
126 the server to operate as a daemon. That is, it detaches
127 itself and runs in the background, fielding requests
128 on the appropriate port. Operating the server as a
129 daemon is the recommended way of running <B
130 CLASS="COMMAND"
131 >smbd</B
132 > for
133 servers that provide more than casual use file and
134 print services. This switch is assumed if <B
135 CLASS="COMMAND"
136 >smbd
138 > is executed on the command line of a shell.
140 ></DD
141 ><DT
142 >-F</DT
143 ><DD
145 >If specified, this parameter causes
146 the main <B
147 CLASS="COMMAND"
148 >smbd</B
149 > process to not daemonize,
150 i.e. double-fork and disassociate with the terminal.
151 Child processes are still created as normal to service
152 each connection request, but the main process does not
153 exit. This operation mode is suitable for running
155 CLASS="COMMAND"
156 >smbd</B
157 > under process supervisors such
158 as <B
159 CLASS="COMMAND"
160 >supervise</B
161 > and <B
162 CLASS="COMMAND"
163 >svscan</B
165 from Daniel J. Bernstein's <B
166 CLASS="COMMAND"
167 >daemontools</B
169 package, or the AIX process monitor.
171 ></DD
172 ><DT
173 >-S</DT
174 ><DD
176 >If specified, this parameter causes
178 CLASS="COMMAND"
179 >smbd</B
180 > to log to standard output rather
181 than a file.</P
182 ></DD
183 ><DT
184 >-i</DT
185 ><DD
187 >If this parameter is specified it causes the
188 server to run "interactively", not as a daemon, even if the
189 server is executed on the command line of a shell. Setting this
190 parameter negates the implicit deamon mode when run from the
191 command line. <B
192 CLASS="COMMAND"
193 >smbd</B
194 > also logs to standard
195 output, as if the <B
196 CLASS="COMMAND"
197 >-S</B
198 > parameter had been
199 given.
201 ></DD
202 ><DT
203 >-V</DT
204 ><DD
206 >Prints the version number for
208 CLASS="COMMAND"
209 >smbd</B
210 >.</P
211 ></DD
212 ><DT
213 >-s &#60;configuration file&#62;</DT
214 ><DD
216 >The file specified contains the
217 configuration details required by the server. The
218 information in this file includes server-specific
219 information such as what printcap file to use, as well
220 as descriptions of all the services that the server is
221 to provide. See <A
222 HREF="smb.conf.5.html"
223 TARGET="_top"
224 ><TT
225 CLASS="FILENAME"
226 >smb.conf(5)</TT
227 ></A
228 > for more information.
229 The default configuration file name is determined at
230 compile time.</P
231 ></DD
232 ><DT
233 >-d|--debug=debuglevel</DT
234 ><DD
236 ><VAR
237 CLASS="REPLACEABLE"
238 >debuglevel</VAR
239 > is an integer
240 from 0 to 10. The default value if this parameter is
241 not specified is zero.</P
243 >The higher this value, the more detail will be
244 logged to the log files about the activities of the
245 server. At level 0, only critical errors and serious
246 warnings will be logged. Level 1 is a reasonable level for
247 day to day running - it generates a small amount of
248 information about operations carried out.</P
250 >Levels above 1 will generate considerable
251 amounts of log data, and should only be used when
252 investigating a problem. Levels above 3 are designed for
253 use only by developers and generate HUGE amounts of log
254 data, most of which is extremely cryptic.</P
256 >Note that specifying this parameter here will
257 override the <A
258 HREF="smb.conf.5.html#loglevel"
259 TARGET="_top"
260 >log
261 level</A
262 > parameter in the <A
263 HREF="smb.conf.5.html"
264 TARGET="_top"
265 ><TT
266 CLASS="FILENAME"
267 >smb.conf(5)</TT
268 ></A
269 > file.</P
270 ></DD
271 ><DT
272 >-l|--logfile=logbasename</DT
273 ><DD
275 >File name for log/debug files. The extension
276 <CODE
277 CLASS="CONSTANT"
278 >".client"</CODE
279 > will be appended. The log file is
280 never removed by the client.</P
281 ></DD
282 ><DT
283 >-h|--help</DT
284 ><DD
286 >Print a summary of command line options.</P
287 ></DD
288 ><DT
289 >-b</DT
290 ><DD
292 >Prints information about how
293 Samba was built.</P
294 ></DD
295 ><DT
296 >-l &#60;log directory&#62;</DT
297 ><DD
299 >If specified,
300 <VAR
301 CLASS="REPLACEABLE"
302 >log directory</VAR
304 specifies a log directory into which the "log.smbd" log
305 file will be created for informational and debug
306 messages from the running server. The log
307 file generated is never removed by the server although
308 its size may be controlled by the <A
309 HREF="smb.conf.5.html#maxlogsize"
310 TARGET="_top"
311 ><VAR
312 CLASS="PARAMETER"
313 >max log size</VAR
314 ></A
316 option in the <SPAN
317 CLASS="CITEREFENTRY"
318 ><SPAN
319 CLASS="REFENTRYTITLE"
320 >smb.conf</SPAN
321 >(5)</SPAN
322 > file. <SPAN
323 CLASS="emphasis"
325 CLASS="EMPHASIS"
326 >Beware:</I
327 ></SPAN
329 If the directory specified does not exist, <B
330 CLASS="COMMAND"
331 >smbd</B
333 will log to the default debug log location defined at compile time.
336 >The default log directory is specified at
337 compile time.</P
338 ></DD
339 ><DT
340 >-p &#60;port number&#62;</DT
341 ><DD
343 ><VAR
344 CLASS="REPLACEABLE"
345 >port number</VAR
346 > is a positive integer
347 value. The default value if this parameter is not
348 specified is 139.</P
350 >This number is the port number that will be
351 used when making connections to the server from client
352 software. The standard (well-known) port number for the
353 SMB over TCP is 139, hence the default. If you wish to
354 run the server as an ordinary user rather than
355 as root, most systems will require you to use a port
356 number greater than 1024 - ask your system administrator
357 for help if you are in this situation.</P
359 >In order for the server to be useful by most
360 clients, should you configure it on a port other
361 than 139, you will require port redirection services
362 on port 139, details of which are outlined in rfc1002.txt
363 section 4.3.5.</P
365 >This parameter is not normally specified except
366 in the above situation.</P
367 ></DD
368 ></DL
369 ></DIV
370 ></DIV
371 ><DIV
372 CLASS="REFSECT1"
374 NAME="AEN127"
375 ></A
376 ><H2
377 >FILES</H2
379 ></P
380 ><DIV
381 CLASS="VARIABLELIST"
382 ><DL
383 ><DT
384 ><TT
385 CLASS="FILENAME"
386 >/etc/inetd.conf</TT
387 ></DT
388 ><DD
390 >If the server is to be run by the
392 CLASS="COMMAND"
393 >inetd</B
394 > meta-daemon, this file
395 must contain suitable startup information for the
396 meta-daemon. See the <A
397 HREF="install.html"
398 TARGET="_top"
399 >"How to Install and Test SAMBA"</A
401 document for details.
403 ></DD
404 ><DT
405 ><TT
406 CLASS="FILENAME"
407 >/etc/rc</TT
408 ></DT
409 ><DD
411 >or whatever initialization script your
412 system uses).</P
414 >If running the server as a daemon at startup,
415 this file will need to contain an appropriate startup
416 sequence for the server. See the <A
417 HREF="install.html"
418 TARGET="_top"
419 >"How to Install and Test SAMBA"</A
421 document for details.</P
422 ></DD
423 ><DT
424 ><TT
425 CLASS="FILENAME"
426 >/etc/services</TT
427 ></DT
428 ><DD
430 >If running the server via the
431 meta-daemon <B
432 CLASS="COMMAND"
433 >inetd</B
434 >, this file
435 must contain a mapping of service name (e.g., netbios-ssn)
436 to service port (e.g., 139) and protocol type (e.g., tcp).
437 See the <A
438 HREF="install.html"
439 TARGET="_top"
440 >"How to Install and Test SAMBA"</A
442 document for details.</P
443 ></DD
444 ><DT
445 ><TT
446 CLASS="FILENAME"
447 >/usr/local/samba/lib/smb.conf</TT
448 ></DT
449 ><DD
451 >This is the default location of the <SPAN
452 CLASS="CITEREFENTRY"
453 ><SPAN
454 CLASS="REFENTRYTITLE"
455 >smb.conf</SPAN
456 >(5)</SPAN
457 > server configuration file. Other common places that systems
458 install this file are <TT
459 CLASS="FILENAME"
460 >/usr/samba/lib/smb.conf</TT
462 and <TT
463 CLASS="FILENAME"
464 >/etc/samba/smb.conf</TT
465 >.</P
467 >This file describes all the services the server
468 is to make available to clients. See <SPAN
469 CLASS="CITEREFENTRY"
470 ><SPAN
471 CLASS="REFENTRYTITLE"
472 >smb.conf</SPAN
473 >(5)</SPAN
474 > for more information.</P
475 ></DD
476 ></DL
477 ></DIV
478 ></DIV
479 ><DIV
480 CLASS="REFSECT1"
482 NAME="AEN165"
483 ></A
484 ><H2
485 >LIMITATIONS</H2
487 >On some systems <B
488 CLASS="COMMAND"
489 >smbd</B
490 > cannot change uid back
491 to root after a setuid() call. Such systems are called
492 trapdoor uid systems. If you have such a system,
493 you will be unable to connect from a client (such as a PC) as
494 two different users at once. Attempts to connect the
495 second user will result in access denied or
496 similar.</P
497 ></DIV
498 ><DIV
499 CLASS="REFSECT1"
501 NAME="AEN169"
502 ></A
503 ><H2
504 >ENVIRONMENT VARIABLES</H2
506 ></P
507 ><DIV
508 CLASS="VARIABLELIST"
509 ><DL
510 ><DT
511 ><VAR
512 CLASS="ENVAR"
513 >PRINTER</VAR
514 ></DT
515 ><DD
517 >If no printer name is specified to
518 printable services, most systems will use the value of
519 this variable (or <CODE
520 CLASS="CONSTANT"
521 >lp</CODE
522 > if this variable is
523 not defined) as the name of the printer to use. This
524 is not specific to the server, however.</P
525 ></DD
526 ></DL
527 ></DIV
528 ></DIV
529 ><DIV
530 CLASS="REFSECT1"
532 NAME="AEN178"
533 ></A
534 ><H2
535 >PAM INTERACTION</H2
537 >Samba uses PAM for authentication (when presented with a plaintext
538 password), for account checking (is this account disabled?) and for
539 session management. The degree too which samba supports PAM is restricted
540 by the limitations of the SMB protocol and the <A
541 HREF="smb.conf.5.html#OBEYPAMRESRICTIONS"
542 TARGET="_top"
543 ><VAR
544 CLASS="PARAMETER"
545 >obey
546 pam restricions</VAR
547 ></A
548 > <SPAN
549 CLASS="CITEREFENTRY"
550 ><SPAN
551 CLASS="REFENTRYTITLE"
552 >smb.conf</SPAN
553 >(5)</SPAN
554 > paramater. When this is set, the following restrictions apply:
557 ></P
558 ><UL
559 ><LI
561 ><SPAN
562 CLASS="emphasis"
564 CLASS="EMPHASIS"
565 >Account Validation</I
566 ></SPAN
567 >: All accesses to a
568 samba server are checked
569 against PAM to see if the account is vaild, not disabled and is permitted to
570 login at this time. This also applies to encrypted logins.
572 ></LI
573 ><LI
575 ><SPAN
576 CLASS="emphasis"
578 CLASS="EMPHASIS"
579 >Session Management</I
580 ></SPAN
581 >: When not using share
582 level secuirty, users must pass PAM's session checks before access
583 is granted. Note however, that this is bypassed in share level secuirty.
584 Note also that some older pam configuration files may need a line
585 added for session support.
587 ></LI
588 ></UL
589 ></DIV
590 ><DIV
591 CLASS="REFSECT1"
593 NAME="AEN193"
594 ></A
595 ><H2
596 >VERSION</H2
598 >This man page is correct for version 3.0 of
599 the Samba suite.</P
600 ></DIV
601 ><DIV
602 CLASS="REFSECT1"
604 NAME="AEN196"
605 ></A
606 ><H2
607 >DIAGNOSTICS</H2
609 >Most diagnostics issued by the server are logged
610 in a specified log file. The log file name is specified
611 at compile time, but may be overridden on the command line.</P
613 >The number and nature of diagnostics available depends
614 on the debug level used by the server. If you have problems, set
615 the debug level to 3 and peruse the log files.</P
617 >Most messages are reasonably self-explanatory. Unfortunately,
618 at the time this man page was created, there are too many diagnostics
619 available in the source code to warrant describing each and every
620 diagnostic. At this stage your best bet is still to grep the
621 source code and inspect the conditions that gave rise to the
622 diagnostics you are seeing.</P
623 ></DIV
624 ><DIV
625 CLASS="REFSECT1"
627 NAME="AEN201"
628 ></A
629 ><H2
630 >SIGNALS</H2
632 >Sending the <B
633 CLASS="COMMAND"
634 >smbd</B
635 > a SIGHUP will cause it to
636 reload its <TT
637 CLASS="FILENAME"
638 >smb.conf</TT
639 > configuration
640 file within a short period of time.</P
642 >To shut down a user's <B
643 CLASS="COMMAND"
644 >smbd</B
645 > process it is recommended
646 that <B
647 CLASS="COMMAND"
648 >SIGKILL (-9)</B
649 > <SPAN
650 CLASS="emphasis"
652 CLASS="EMPHASIS"
653 >NOT</I
654 ></SPAN
656 be used, except as a last resort, as this may leave the shared
657 memory area in an inconsistent state. The safe way to terminate
658 an <B
659 CLASS="COMMAND"
660 >smbd</B
661 > is to send it a SIGTERM (-15) signal and wait for
662 it to die on its own.</P
664 >The debug log level of <B
665 CLASS="COMMAND"
666 >smbd</B
667 > may be raised
668 or lowered using <SPAN
669 CLASS="CITEREFENTRY"
670 ><SPAN
671 CLASS="REFENTRYTITLE"
672 >smbcontrol</SPAN
673 >(1)</SPAN
674 > program (SIGUSR[1|2] signals are no longer
675 used since Samba 2.2). This is to allow transient problems to be diagnosed,
676 whilst still running at a normally low log level.</P
678 >Note that as the signal handlers send a debug write,
679 they are not re-entrant in <B
680 CLASS="COMMAND"
681 >smbd</B
682 >. This you should wait until
684 CLASS="COMMAND"
685 >smbd</B
686 > is in a state of waiting for an incoming SMB before
687 issuing them. It is possible to make the signal handlers safe
688 by un-blocking the signals before the select call and re-blocking
689 them after, however this would affect performance.</P
690 ></DIV
691 ><DIV
692 CLASS="REFSECT1"
694 NAME="AEN219"
695 ></A
696 ><H2
697 >SEE ALSO</H2
699 ><SPAN
700 CLASS="CITEREFENTRY"
701 ><SPAN
702 CLASS="REFENTRYTITLE"
703 >hosts_access</SPAN
704 >(5)</SPAN
705 >, <SPAN
706 CLASS="CITEREFENTRY"
707 ><SPAN
708 CLASS="REFENTRYTITLE"
709 >inetd</SPAN
710 >(8)</SPAN
711 >, <SPAN
712 CLASS="CITEREFENTRY"
713 ><SPAN
714 CLASS="REFENTRYTITLE"
715 >nmbd</SPAN
716 >(8)</SPAN
717 >, <SPAN
718 CLASS="CITEREFENTRY"
719 ><SPAN
720 CLASS="REFENTRYTITLE"
721 >smb.conf</SPAN
722 >(5)</SPAN
723 >, <SPAN
724 CLASS="CITEREFENTRY"
725 ><SPAN
726 CLASS="REFENTRYTITLE"
727 >smbclient</SPAN
728 >(1)</SPAN
729 >, <SPAN
730 CLASS="CITEREFENTRY"
731 ><SPAN
732 CLASS="REFENTRYTITLE"
733 >testparm</SPAN
734 >(1)</SPAN
735 >, <SPAN
736 CLASS="CITEREFENTRY"
737 ><SPAN
738 CLASS="REFENTRYTITLE"
739 >testprns</SPAN
740 >(1)</SPAN
741 >, and the
742 Internet RFC's <TT
743 CLASS="FILENAME"
744 >rfc1001.txt</TT
745 >, <TT
746 CLASS="FILENAME"
747 >rfc1002.txt</TT
749 In addition the CIFS (formerly SMB) specification is available
750 as a link from the Web page <A
751 HREF="http://samba.org/cifs/"
752 TARGET="_top"
754 http://samba.org/cifs/</A
755 >.</P
756 ></DIV
757 ><DIV
758 CLASS="REFSECT1"
760 NAME="AEN246"
761 ></A
762 ><H2
763 >AUTHOR</H2
765 >The original Samba software and related utilities
766 were created by Andrew Tridgell. Samba is now developed
767 by the Samba Team as an Open Source project similar
768 to the way the Linux kernel is developed.</P
770 >The original Samba man pages were written by Karl Auer.
771 The man page sources were converted to YODL format (another
772 excellent piece of Open Source software, available at <A
773 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
774 TARGET="_top"
775 > ftp://ftp.icce.rug.nl/pub/unix/</A
776 >) and updated for the Samba 2.0
777 release by Jeremy Allison. The conversion to DocBook for
778 Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for
779 Samba 3.0 was done by Alexander Bokovoy.</P
780 ></DIV
781 ></BODY
782 ></HTML