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