72fc10e2e4266b1b34424f52cfe3f2ce5c6f69d7
[jra/samba/.git] / docs / htmldocs / smbd.8.html
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
86
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"
108 ><A
109 NAME="AEN38"
110 ></A
111 ><H2
112 >OPTIONS</H2
113 ><P
114 ></P
115 ><DIV
116 CLASS="VARIABLELIST"
117 ><DL
118 ><DT
119 >-D</DT
120 ><DD
121 ><P
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
134                 </B
135 > is executed on the command line of a shell.
136                 </P
137 ></DD
138 ><DT
139 >-a</DT
140 ><DD
141 ><P
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
149 ><P
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.
155                 </P
156 ></DD
157 ><DT
158 >-o</DT
159 ><DD
160 ><P
161 >If this parameter is specified, the 
162                 log files will be overwritten when opened.  By default, 
163                 <B
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
172 ><P
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
183 ><P
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
193 ><P
194 >Prints the version number for 
195                 <B
196 CLASS="COMMAND"
197 >smbd</B
198 >.</P
199 ></DD
200 ><DT
201 >-b</DT
202 ><DD
203 ><P
204 >Prints information about how 
205                 Samba was built.</P
206 ></DD
207 ><DT
208 >-d &#60;debug level&#62;</DT
209 ><DD
210 ><P
211 ><TT
212 CLASS="REPLACEABLE"
213 ><I
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
219 ><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
226 ><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
232 ><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
251 ><P
252 >If specified,
253                 <TT
254 CLASS="REPLACEABLE"
255 ><I
256 >log directory</I
257 ></TT
258
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
267 >
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.
276                 </P
277 ><P
278 >The default log directory is specified at
279                 compile time.</P
280 ></DD
281 ><DT
282 >-O &#60;socket options&#62;</DT
283 ><DD
284 ><P
285 >See the <A
286 HREF="smb.conf.5.html#socketoptions"
287 TARGET="_top"
288 >socket options</A
289
290                 parameter in the <A
291 HREF="smb.conf.5.html"
292 TARGET="_top"
293 ><TT
294 CLASS="FILENAME"
295 >smb.conf(5)
296                 </TT
297 ></A
298 > file for details.</P
299 ></DD
300 ><DT
301 >-p &#60;port number&#62;</DT
302 ><DD
303 ><P
304 ><TT
305 CLASS="REPLACEABLE"
306 ><I
307 >port number</I
308 ></TT
309 > is a positive integer 
310                 value.  The default value if this parameter is not 
311                 specified is 139.</P
312 ><P
313 >This number is the port number that will be 
314                 used when making connections to the server from client 
315                 software. The standard (well-known) port number for the 
316                 SMB over TCP is 139, hence the default. If you wish to 
317                 run the server as an ordinary user rather than
318                 as root, most systems will require you to use a port 
319                 number greater than 1024 - ask your system administrator 
320                 for help if you are in this situation.</P
321 ><P
322 >In order for the server to be useful by most 
323                 clients, should you configure it on a port other 
324                 than 139, you will require port redirection services 
325                 on port 139, details of which are outlined in rfc1002.txt 
326                 section 4.3.5.</P
327 ><P
328 >This parameter is not normally specified except 
329                 in the above situation.</P
330 ></DD
331 ><DT
332 >-s &#60;configuration file&#62;</DT
333 ><DD
334 ><P
335 >The file specified contains the 
336                 configuration details required by the server.  The 
337                 information in this file includes server-specific
338                 information such as what printcap file to use, as well 
339                 as descriptions of all the services that the server is 
340                 to provide. See <A
341 HREF="smb.conf.5.html"
342 TARGET="_top"
343 ><TT
344 CLASS="FILENAME"
345 >               smb.conf(5)</TT
346 ></A
347 > for more information.
348                 The default configuration file name is determined at 
349                 compile time.</P
350 ></DD
351 ></DL
352 ></DIV
353 ></DIV
354 ><DIV
355 CLASS="REFSECT1"
356 ><A
357 NAME="AEN120"
358 ></A
359 ><H2
360 >FILES</H2
361 ><P
362 ></P
363 ><DIV
364 CLASS="VARIABLELIST"
365 ><DL
366 ><DT
367 ><TT
368 CLASS="FILENAME"
369 >/etc/inetd.conf</TT
370 ></DT
371 ><DD
372 ><P
373 >If the server is to be run by the 
374                 <B
375 CLASS="COMMAND"
376 >inetd</B
377 > meta-daemon, this file 
378                 must contain suitable startup information for the 
379                 meta-daemon. See the <A
380 HREF="UNIX_INSTALL.html"
381 TARGET="_top"
382 >UNIX_INSTALL.html</A
383 >
384                 document for details.
385                 </P
386 ></DD
387 ><DT
388 ><TT
389 CLASS="FILENAME"
390 >/etc/rc</TT
391 ></DT
392 ><DD
393 ><P
394 >or whatever initialization script your 
395                 system uses).</P
396 ><P
397 >If running the server as a daemon at startup, 
398                 this file will need to contain an appropriate startup 
399                 sequence for the server. See the <A
400 HREF="UNIX_INSTALL.html"
401 TARGET="_top"
402 >UNIX_INSTALL.html</A
403 >
404                 document for details.</P
405 ></DD
406 ><DT
407 ><TT
408 CLASS="FILENAME"
409 >/etc/services</TT
410 ></DT
411 ><DD
412 ><P
413 >If running the server via the 
414                 meta-daemon <B
415 CLASS="COMMAND"
416 >inetd</B
417 >, this file 
418                 must contain a mapping of service name (e.g., netbios-ssn) 
419                 to service port (e.g., 139) and protocol type (e.g., tcp). 
420                 See the <A
421 HREF="UNIX_INSTALL.html"
422 TARGET="_top"
423 >UNIX_INSTALL.html</A
424 >
425                 document for details.</P
426 ></DD
427 ><DT
428 ><TT
429 CLASS="FILENAME"
430 >/usr/local/samba/lib/smb.conf</TT
431 ></DT
432 ><DD
433 ><P
434 >This is the default location of the 
435                 <A
436 HREF="smb.conf.5.html"
437 TARGET="_top"
438 ><TT
439 CLASS="FILENAME"
440 >smb.conf</TT
441 ></A
442 >
443                 server configuration file. Other common places that systems 
444                 install this file are <TT
445 CLASS="FILENAME"
446 >/usr/samba/lib/smb.conf</TT
447
448                 and <TT
449 CLASS="FILENAME"
450 >/etc/smb.conf</TT
451 >.</P
452 ><P
453 >This file describes all the services the server 
454                 is to make available to clients. See <A
455 HREF="smb.conf.5.html"
456 TARGET="_top"
457 >               <TT
458 CLASS="FILENAME"
459 >smb.conf(5)</TT
460 ></A
461 >  for more information.</P
462 ></DD
463 ></DL
464 ></DIV
465 ></DIV
466 ><DIV
467 CLASS="REFSECT1"
468 ><A
469 NAME="AEN156"
470 ></A
471 ><H2
472 >LIMITATIONS</H2
473 ><P
474 >On some systems <B
475 CLASS="COMMAND"
476 >smbd</B
477 > cannot change uid back 
478         to root after a setuid() call.  Such systems are called 
479         trapdoor uid systems. If you have such a system, 
480         you will be unable to connect from a client (such as a PC) as 
481         two different users at once. Attempts to connect the
482         second user will result in access denied or 
483         similar.</P
484 ></DIV
485 ><DIV
486 CLASS="REFSECT1"
487 ><A
488 NAME="AEN160"
489 ></A
490 ><H2
491 >ENVIRONMENT VARIABLES</H2
492 ><P
493 ></P
494 ><DIV
495 CLASS="VARIABLELIST"
496 ><DL
497 ><DT
498 ><TT
499 CLASS="ENVAR"
500 >PRINTER</TT
501 ></DT
502 ><DD
503 ><P
504 >If no printer name is specified to 
505                 printable services, most systems will use the value of 
506                 this variable (or <TT
507 CLASS="CONSTANT"
508 >lp</TT
509 > if this variable is 
510                 not defined) as the name of the printer to use. This 
511                 is not specific to the server, however.</P
512 ></DD
513 ></DL
514 ></DIV
515 ></DIV
516 ><DIV
517 CLASS="REFSECT1"
518 ><A
519 NAME="AEN169"
520 ></A
521 ><H2
522 >PAM INTERACTION</H2
523 ><P
524 >Samba uses PAM for authentication (when presented with a plaintext 
525         password), for account checking (is this account disabled?) and for
526         session management.  The degree too which samba supports PAM is restricted
527         by the limitations of the SMB protocol and the 
528         <A
529 HREF="smb.conf.5.html#OBEYPAMRESRICTIONS"
530 TARGET="_top"
531 >obey pam restricions</A
532 >
533         smb.conf paramater.  When this is set, the following restrictions apply:
534         </P
535 ><P
536 ></P
537 ><UL
538 ><LI
539 ><P
540 ><EM
541 >Account Validation</EM
542 >:  All acccesses to a 
543         samba server are checked 
544         against PAM to see if the account is vaild, not disabled and is permitted to 
545         login at this time.  This also applies to encrypted logins.
546         </P
547 ></LI
548 ><LI
549 ><P
550 ><EM
551 >Session Management</EM
552 >:  When not using share 
553         level secuirty, users must pass PAM's session checks before access 
554         is granted.  Note however, that this is bypassed in share level secuirty.  
555         Note also that some older pam configuration files may need a line 
556         added for session support. 
557         </P
558 ></LI
559 ></UL
560 ></DIV
561 ><DIV
562 CLASS="REFSECT1"
563 ><A
564 NAME="AEN180"
565 ></A
566 ><H2
567 >VERSION</H2
568 ><P
569 >This man page is correct for version 2.2 of 
570         the Samba suite.</P
571 ></DIV
572 ><DIV
573 CLASS="REFSECT1"
574 ><A
575 NAME="AEN183"
576 ></A
577 ><H2
578 >DIAGNOSTICS</H2
579 ><P
580 >Most diagnostics issued by the server are logged 
581         in a specified log file. The log file name is specified 
582         at compile time, but may be overridden on the command line.</P
583 ><P
584 >The number and nature of diagnostics available depends 
585         on the debug level used by the server. If you have problems, set 
586         the debug level to 3 and peruse the log files.</P
587 ><P
588 >Most messages are reasonably self-explanatory. Unfortunately, 
589         at the time this man page was created, there are too many diagnostics 
590         available in the source code to warrant describing each and every 
591         diagnostic. At this stage your best bet is still to grep the 
592         source code and inspect the conditions that gave rise to the 
593         diagnostics you are seeing.</P
594 ></DIV
595 ><DIV
596 CLASS="REFSECT1"
597 ><A
598 NAME="AEN188"
599 ></A
600 ><H2
601 >SIGNALS</H2
602 ><P
603 >Sending the <B
604 CLASS="COMMAND"
605 >smbd</B
606 > a SIGHUP will cause it to 
607         reload its <TT
608 CLASS="FILENAME"
609 >smb.conf</TT
610 > configuration 
611         file within a short period of time.</P
612 ><P
613 >To shut down a user's <B
614 CLASS="COMMAND"
615 >smbd</B
616 > process it is recommended 
617         that <B
618 CLASS="COMMAND"
619 >SIGKILL (-9)</B
620 > <EM
621 >NOT</EM
622
623         be used, except as a last resort, as this may leave the shared
624         memory area in an inconsistent state. The safe way to terminate 
625         an <B
626 CLASS="COMMAND"
627 >smbd</B
628 > is to send it a SIGTERM (-15) signal and wait for 
629         it to die on its own.</P
630 ><P
631 >The debug log level of <B
632 CLASS="COMMAND"
633 >smbd</B
634 > may be raised
635         or lowered using <A
636 HREF="smbcontrol.1.html"
637 TARGET="_top"
638 ><B
639 CLASS="COMMAND"
640 >smbcontrol(1)
641         </B
642 ></A
643 > program (SIGUSR[1|2] signals are no longer used in
644         Samba 2.2). This is to allow transient problems to be diagnosed, 
645         whilst still running at a normally low log level.</P
646 ><P
647 >Note that as the signal handlers send a debug write, 
648         they are not re-entrant in <B
649 CLASS="COMMAND"
650 >smbd</B
651 >. This you should wait until 
652         <B
653 CLASS="COMMAND"
654 >smbd</B
655 > is in a state of waiting for an incoming SMB before 
656         issuing them. It is possible to make the signal handlers safe 
657         by un-blocking the signals before the select call and re-blocking 
658         them after, however this would affect performance.</P
659 ></DIV
660 ><DIV
661 CLASS="REFSECT1"
662 ><A
663 NAME="AEN205"
664 ></A
665 ><H2
666 >SEE ALSO</H2
667 ><P
668 >hosts_access(5), <B
669 CLASS="COMMAND"
670 >inetd(8)</B
671 >, 
672         <A
673 HREF="nmbd.8.html"
674 TARGET="_top"
675 ><B
676 CLASS="COMMAND"
677 >nmbd(8)</B
678 ></A
679 >, 
680         <A
681 HREF="smb.conf.5.html"
682 TARGET="_top"
683 ><TT
684 CLASS="FILENAME"
685 >smb.conf(5)</TT
686 >
687         </A
688 >, <A
689 HREF="smbclient.1.html"
690 TARGET="_top"
691 ><B
692 CLASS="COMMAND"
693 >smbclient(1)
694         </B
695 ></A
696 >, <A
697 HREF="testparm.1.html"
698 TARGET="_top"
699 ><B
700 CLASS="COMMAND"
701 >       testparm(1)</B
702 ></A
703 >, <A
704 HREF="testprns.1.html"
705 TARGET="_top"
706 >       <B
707 CLASS="COMMAND"
708 >testprns(1)</B
709 ></A
710 >, and the Internet RFC's
711         <TT
712 CLASS="FILENAME"
713 >rfc1001.txt</TT
714 >, <TT
715 CLASS="FILENAME"
716 >rfc1002.txt</TT
717 >. 
718         In addition the CIFS (formerly SMB) specification is available 
719         as a link from the Web page <A
720 HREF="http://samba.org/cifs/"
721 TARGET="_top"
722
723         http://samba.org/cifs/</A
724 >.</P
725 ></DIV
726 ><DIV
727 CLASS="REFSECT1"
728 ><A
729 NAME="AEN222"
730 ></A
731 ><H2
732 >AUTHOR</H2
733 ><P
734 >The original Samba software and related utilities 
735         were created by Andrew Tridgell. Samba is now developed
736         by the Samba Team as an Open Source project similar 
737         to the way the Linux kernel is developed.</P
738 ><P
739 >The original Samba man pages were written by Karl Auer. 
740         The man page sources were converted to YODL format (another 
741         excellent piece of Open Source software, available at
742         <A
743 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
744 TARGET="_top"
745 >       ftp://ftp.icce.rug.nl/pub/unix/</A
746 >) and updated for the Samba 2.0 
747         release by Jeremy Allison.  The conversion to DocBook for 
748         Samba 2.2 was done by Gerald Carter</P
749 ></DIV
750 ></BODY
751 ></HTML
752 >