fix up IPC/LPT:/A: devicetype in tcon_and_X
[Samba.git] / docs / htmldocs / smbd.8.html
blob6f1cb8c0573df2277159afa7e74977690326efd1
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 >-h</DT
204 ><DD
206 >Prints the help information (usage)
207 for <B
208 CLASS="COMMAND"
209 >smbd</B
210 >.</P
211 ></DD
212 ><DT
213 >-V</DT
214 ><DD
216 >Prints the version number for
218 CLASS="COMMAND"
219 >smbd</B
220 >.</P
221 ></DD
222 ><DT
223 >-b</DT
224 ><DD
226 >Prints information about how
227 Samba was built.</P
228 ></DD
229 ><DT
230 >-d &#60;debug level&#62;</DT
231 ><DD
233 ><VAR
234 CLASS="REPLACEABLE"
235 >debuglevel</VAR
236 > is an integer
237 from 0 to 10. The default value if this parameter is
238 not specified is zero.</P
240 >The higher this value, the more detail will be
241 logged to the log files about the activities of the
242 server. At level 0, only critical errors and serious
243 warnings will be logged. Level 1 is a reasonable level for
244 day to day running - it generates a small amount of
245 information about operations carried out.</P
247 >Levels above 1 will generate considerable
248 amounts of log data, and should only be used when
249 investigating a problem. Levels above 3 are designed for
250 use only by developers and generate HUGE amounts of log
251 data, most of which is extremely cryptic.</P
253 >Note that specifying this parameter here will
254 override the <A
255 HREF="smb.conf.5.html#loglevel"
256 TARGET="_top"
257 ><VAR
258 CLASS="PARAMETER"
259 >log
260 level</VAR
261 ></A
262 > parameter in the <SPAN
263 CLASS="CITEREFENTRY"
264 ><SPAN
265 CLASS="REFENTRYTITLE"
266 >smb.conf</SPAN
267 >(5)</SPAN
268 > file.</P
269 ></DD
270 ><DT
271 >-l &#60;log directory&#62;</DT
272 ><DD
274 >If specified,
275 <VAR
276 CLASS="REPLACEABLE"
277 >log directory</VAR
279 specifies a log directory into which the "log.smbd" log
280 file will be created for informational and debug
281 messages from the running server. The log
282 file generated is never removed by the server although
283 its size may be controlled by the <A
284 HREF="smb.conf.5.html#maxlogsize"
285 TARGET="_top"
286 ><VAR
287 CLASS="PARAMETER"
288 >max log size</VAR
289 ></A
291 option in the <SPAN
292 CLASS="CITEREFENTRY"
293 ><SPAN
294 CLASS="REFENTRYTITLE"
295 >smb.conf</SPAN
296 >(5)</SPAN
297 > file. <SPAN
298 CLASS="emphasis"
300 CLASS="EMPHASIS"
301 >Beware:</I
302 ></SPAN
304 If the directory specified does not exist, <B
305 CLASS="COMMAND"
306 >smbd</B
308 will log to the default debug log location defined at compile time.
311 >The default log directory is specified at
312 compile time.</P
313 ></DD
314 ><DT
315 >-O &#60;socket options&#62;</DT
316 ><DD
318 >See the <A
319 HREF="smb.conf.5.html#socketoptions"
320 TARGET="_top"
321 ><VAR
322 CLASS="PARAMETER"
323 >socket options</VAR
324 ></A
326 parameter in the <SPAN
327 CLASS="CITEREFENTRY"
328 ><SPAN
329 CLASS="REFENTRYTITLE"
330 >smb.conf</SPAN
331 >(5)</SPAN
332 > file for details.</P
333 ></DD
334 ><DT
335 >-p &#60;port number&#62;</DT
336 ><DD
338 ><VAR
339 CLASS="REPLACEABLE"
340 >port number</VAR
341 > is a positive integer
342 value. The default value if this parameter is not
343 specified is 139.</P
345 >This number is the port number that will be
346 used when making connections to the server from client
347 software. The standard (well-known) port number for the
348 SMB over TCP is 139, hence the default. If you wish to
349 run the server as an ordinary user rather than
350 as root, most systems will require you to use a port
351 number greater than 1024 - ask your system administrator
352 for help if you are in this situation.</P
354 >In order for the server to be useful by most
355 clients, should you configure it on a port other
356 than 139, you will require port redirection services
357 on port 139, details of which are outlined in rfc1002.txt
358 section 4.3.5.</P
360 >This parameter is not normally specified except
361 in the above situation.</P
362 ></DD
363 ><DT
364 >-s &#60;configuration file&#62;</DT
365 ><DD
367 >The file specified contains the
368 configuration details required by the server. The
369 information in this file includes server-specific
370 information such as what printcap file to use, as well
371 as descriptions of all the services that the server is
372 to provide. See <SPAN
373 CLASS="CITEREFENTRY"
374 ><SPAN
375 CLASS="REFENTRYTITLE"
376 >smb.conf</SPAN
377 >(5)</SPAN
378 > for more information.
379 The default configuration file name is determined at
380 compile time.</P
381 ></DD
382 ></DL
383 ></DIV
384 ></DIV
385 ><DIV
386 CLASS="REFSECT1"
388 NAME="AEN135"
389 ></A
390 ><H2
391 >FILES</H2
393 ></P
394 ><DIV
395 CLASS="VARIABLELIST"
396 ><DL
397 ><DT
398 ><TT
399 CLASS="FILENAME"
400 >/etc/inetd.conf</TT
401 ></DT
402 ><DD
404 >If the server is to be run by the
406 CLASS="COMMAND"
407 >inetd</B
408 > meta-daemon, this file
409 must contain suitable startup information for the
410 meta-daemon. See the <A
411 HREF="install.html"
412 TARGET="_top"
413 >"How to Install and Test SAMBA"</A
415 document for details.
417 ></DD
418 ><DT
419 ><TT
420 CLASS="FILENAME"
421 >/etc/rc</TT
422 ></DT
423 ><DD
425 >or whatever initialization script your
426 system uses).</P
428 >If running the server as a daemon at startup,
429 this file will need to contain an appropriate startup
430 sequence for the server. See the <A
431 HREF="install.html"
432 TARGET="_top"
433 >"How to Install and Test SAMBA"</A
435 document for details.</P
436 ></DD
437 ><DT
438 ><TT
439 CLASS="FILENAME"
440 >/etc/services</TT
441 ></DT
442 ><DD
444 >If running the server via the
445 meta-daemon <B
446 CLASS="COMMAND"
447 >inetd</B
448 >, this file
449 must contain a mapping of service name (e.g., netbios-ssn)
450 to service port (e.g., 139) and protocol type (e.g., tcp).
451 See the <A
452 HREF="install.html"
453 TARGET="_top"
454 >"How to Install and Test SAMBA"</A
456 document for details.</P
457 ></DD
458 ><DT
459 ><TT
460 CLASS="FILENAME"
461 >/usr/local/samba/lib/smb.conf</TT
462 ></DT
463 ><DD
465 >This is the default location of the <SPAN
466 CLASS="CITEREFENTRY"
467 ><SPAN
468 CLASS="REFENTRYTITLE"
469 >smb.conf</SPAN
470 >(5)</SPAN
471 > server configuration file. Other common places that systems
472 install this file are <TT
473 CLASS="FILENAME"
474 >/usr/samba/lib/smb.conf</TT
476 and <TT
477 CLASS="FILENAME"
478 >/etc/samba/smb.conf</TT
479 >.</P
481 >This file describes all the services the server
482 is to make available to clients. See <SPAN
483 CLASS="CITEREFENTRY"
484 ><SPAN
485 CLASS="REFENTRYTITLE"
486 >smb.conf</SPAN
487 >(5)</SPAN
488 > for more information.</P
489 ></DD
490 ></DL
491 ></DIV
492 ></DIV
493 ><DIV
494 CLASS="REFSECT1"
496 NAME="AEN173"
497 ></A
498 ><H2
499 >LIMITATIONS</H2
501 >On some systems <B
502 CLASS="COMMAND"
503 >smbd</B
504 > cannot change uid back
505 to root after a setuid() call. Such systems are called
506 trapdoor uid systems. If you have such a system,
507 you will be unable to connect from a client (such as a PC) as
508 two different users at once. Attempts to connect the
509 second user will result in access denied or
510 similar.</P
511 ></DIV
512 ><DIV
513 CLASS="REFSECT1"
515 NAME="AEN177"
516 ></A
517 ><H2
518 >ENVIRONMENT VARIABLES</H2
520 ></P
521 ><DIV
522 CLASS="VARIABLELIST"
523 ><DL
524 ><DT
525 ><VAR
526 CLASS="ENVAR"
527 >PRINTER</VAR
528 ></DT
529 ><DD
531 >If no printer name is specified to
532 printable services, most systems will use the value of
533 this variable (or <CODE
534 CLASS="CONSTANT"
535 >lp</CODE
536 > if this variable is
537 not defined) as the name of the printer to use. This
538 is not specific to the server, however.</P
539 ></DD
540 ></DL
541 ></DIV
542 ></DIV
543 ><DIV
544 CLASS="REFSECT1"
546 NAME="AEN186"
547 ></A
548 ><H2
549 >PAM INTERACTION</H2
551 >Samba uses PAM for authentication (when presented with a plaintext
552 password), for account checking (is this account disabled?) and for
553 session management. The degree too which samba supports PAM is restricted
554 by the limitations of the SMB protocol and the <A
555 HREF="smb.conf.5.html#OBEYPAMRESRICTIONS"
556 TARGET="_top"
557 ><VAR
558 CLASS="PARAMETER"
559 >obey
560 pam restricions</VAR
561 ></A
562 > <SPAN
563 CLASS="CITEREFENTRY"
564 ><SPAN
565 CLASS="REFENTRYTITLE"
566 >smb.conf</SPAN
567 >(5)</SPAN
568 > paramater. When this is set, the following restrictions apply:
571 ></P
572 ><UL
573 ><LI
575 ><SPAN
576 CLASS="emphasis"
578 CLASS="EMPHASIS"
579 >Account Validation</I
580 ></SPAN
581 >: All accesses to a
582 samba server are checked
583 against PAM to see if the account is vaild, not disabled and is permitted to
584 login at this time. This also applies to encrypted logins.
586 ></LI
587 ><LI
589 ><SPAN
590 CLASS="emphasis"
592 CLASS="EMPHASIS"
593 >Session Management</I
594 ></SPAN
595 >: When not using share
596 level secuirty, users must pass PAM's session checks before access
597 is granted. Note however, that this is bypassed in share level secuirty.
598 Note also that some older pam configuration files may need a line
599 added for session support.
601 ></LI
602 ></UL
603 ></DIV
604 ><DIV
605 CLASS="REFSECT1"
607 NAME="AEN201"
608 ></A
609 ><H2
610 >VERSION</H2
612 >This man page is correct for version 3.0 of
613 the Samba suite.</P
614 ></DIV
615 ><DIV
616 CLASS="REFSECT1"
618 NAME="AEN204"
619 ></A
620 ><H2
621 >DIAGNOSTICS</H2
623 >Most diagnostics issued by the server are logged
624 in a specified log file. The log file name is specified
625 at compile time, but may be overridden on the command line.</P
627 >The number and nature of diagnostics available depends
628 on the debug level used by the server. If you have problems, set
629 the debug level to 3 and peruse the log files.</P
631 >Most messages are reasonably self-explanatory. Unfortunately,
632 at the time this man page was created, there are too many diagnostics
633 available in the source code to warrant describing each and every
634 diagnostic. At this stage your best bet is still to grep the
635 source code and inspect the conditions that gave rise to the
636 diagnostics you are seeing.</P
637 ></DIV
638 ><DIV
639 CLASS="REFSECT1"
641 NAME="AEN209"
642 ></A
643 ><H2
644 >SIGNALS</H2
646 >Sending the <B
647 CLASS="COMMAND"
648 >smbd</B
649 > a SIGHUP will cause it to
650 reload its <TT
651 CLASS="FILENAME"
652 >smb.conf</TT
653 > configuration
654 file within a short period of time.</P
656 >To shut down a user's <B
657 CLASS="COMMAND"
658 >smbd</B
659 > process it is recommended
660 that <B
661 CLASS="COMMAND"
662 >SIGKILL (-9)</B
663 > <SPAN
664 CLASS="emphasis"
666 CLASS="EMPHASIS"
667 >NOT</I
668 ></SPAN
670 be used, except as a last resort, as this may leave the shared
671 memory area in an inconsistent state. The safe way to terminate
672 an <B
673 CLASS="COMMAND"
674 >smbd</B
675 > is to send it a SIGTERM (-15) signal and wait for
676 it to die on its own.</P
678 >The debug log level of <B
679 CLASS="COMMAND"
680 >smbd</B
681 > may be raised
682 or lowered using <SPAN
683 CLASS="CITEREFENTRY"
684 ><SPAN
685 CLASS="REFENTRYTITLE"
686 >smbcontrol</SPAN
687 >(1)</SPAN
688 > program (SIGUSR[1|2] signals are no longer
689 used since Samba 2.2). This is to allow transient problems to be diagnosed,
690 whilst still running at a normally low log level.</P
692 >Note that as the signal handlers send a debug write,
693 they are not re-entrant in <B
694 CLASS="COMMAND"
695 >smbd</B
696 >. This you should wait until
698 CLASS="COMMAND"
699 >smbd</B
700 > is in a state of waiting for an incoming SMB before
701 issuing them. It is possible to make the signal handlers safe
702 by un-blocking the signals before the select call and re-blocking
703 them after, however this would affect performance.</P
704 ></DIV
705 ><DIV
706 CLASS="REFSECT1"
708 NAME="AEN227"
709 ></A
710 ><H2
711 >SEE ALSO</H2
713 ><SPAN
714 CLASS="CITEREFENTRY"
715 ><SPAN
716 CLASS="REFENTRYTITLE"
717 >hosts_access</SPAN
718 >(5)</SPAN
719 >, <SPAN
720 CLASS="CITEREFENTRY"
721 ><SPAN
722 CLASS="REFENTRYTITLE"
723 >inetd</SPAN
724 >(8)</SPAN
725 >, <SPAN
726 CLASS="CITEREFENTRY"
727 ><SPAN
728 CLASS="REFENTRYTITLE"
729 >nmbd</SPAN
730 >(8)</SPAN
731 >, <SPAN
732 CLASS="CITEREFENTRY"
733 ><SPAN
734 CLASS="REFENTRYTITLE"
735 >smb.conf</SPAN
736 >(5)</SPAN
737 >, <SPAN
738 CLASS="CITEREFENTRY"
739 ><SPAN
740 CLASS="REFENTRYTITLE"
741 >smbclient</SPAN
742 >(1)</SPAN
743 >, <SPAN
744 CLASS="CITEREFENTRY"
745 ><SPAN
746 CLASS="REFENTRYTITLE"
747 >testparm</SPAN
748 >(1)</SPAN
749 >, <SPAN
750 CLASS="CITEREFENTRY"
751 ><SPAN
752 CLASS="REFENTRYTITLE"
753 >testprns</SPAN
754 >(1)</SPAN
755 >, and the
756 Internet RFC's <TT
757 CLASS="FILENAME"
758 >rfc1001.txt</TT
759 >, <TT
760 CLASS="FILENAME"
761 >rfc1002.txt</TT
763 In addition the CIFS (formerly SMB) specification is available
764 as a link from the Web page <A
765 HREF="http://samba.org/cifs/"
766 TARGET="_top"
768 http://samba.org/cifs/</A
769 >.</P
770 ></DIV
771 ><DIV
772 CLASS="REFSECT1"
774 NAME="AEN254"
775 ></A
776 ><H2
777 >AUTHOR</H2
779 >The original Samba software and related utilities
780 were created by Andrew Tridgell. Samba is now developed
781 by the Samba Team as an Open Source project similar
782 to the way the Linux kernel is developed.</P
784 >The original Samba man pages were written by Karl Auer.
785 The man page sources were converted to YODL format (another
786 excellent piece of Open Source software, available at <A
787 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
788 TARGET="_top"
789 > ftp://ftp.icce.rug.nl/pub/unix/</A
790 >) and updated for the Samba 2.0
791 release by Jeremy Allison. The conversion to DocBook for
792 Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2 for
793 Samba 3.0 was done by Alexander Bokovoy.</P
794 ></DIV
795 ></BODY
796 ></HTML