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