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