c9cdb5908be761e3180b1d239ba544d1862c8ec4
[nivanova/samba-autobuild/.git] / docs / htmldocs / nmbd.8.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >nmbd</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="NMBD"
19 ></A
20 >nmbd</H1
21 ><DIV
22 CLASS="REFNAMEDIV"
23 ><A
24 NAME="AEN5"
25 ></A
26 ><H2
27 >Name</H2
28 >nmbd&nbsp;--&nbsp;NetBIOS name server to provide NetBIOS 
29         over IP naming services to clients</DIV
30 ><DIV
31 CLASS="REFSYNOPSISDIV"
32 ><A
33 NAME="AEN8"
34 ></A
35 ><H2
36 >Synopsis</H2
37 ><P
38 ><B
39 CLASS="COMMAND"
40 >nmbd</B
41 >  [-D] [-a] [-i] [-o] [-h] [-V] [-d &lt;debug level&gt;] [-H &lt;lmhosts file&gt;] [-l &lt;log directory&gt;] [-n &lt;primary netbios name&gt;] [-p &lt;port number&gt;] [-s &lt;configuration file&gt;]</P
42 ></DIV
43 ><DIV
44 CLASS="REFSECT1"
45 ><A
46 NAME="AEN23"
47 ></A
48 ><H2
49 >DESCRIPTION</H2
50 ><P
51 >This program is part of the Samba suite.</P
52 ><P
53 ><B
54 CLASS="COMMAND"
55 >nmbd</B
56 > is a server that understands 
57         and can reply to NetBIOS over IP name service requests, like 
58         those produced by SMB/CIFS clients such as Windows 95/98/ME, 
59         Windows NT, Windows 2000, Windows XP and LanManager clients. It also
60         participates in the browsing protocols which make up the 
61         Windows "Network Neighborhood" view.</P
62 ><P
63 >SMB/CIFS clients, when they start up, may wish to 
64         locate an SMB/CIFS server. That is, they wish to know what 
65         IP number a specified host is using.</P
66 ><P
67 >Amongst other services, <B
68 CLASS="COMMAND"
69 >nmbd</B
70 > will 
71         listen for such requests, and if its own NetBIOS name is 
72         specified it will respond with the IP number of the host it 
73         is running on.  Its "own NetBIOS name" is by
74         default the primary DNS name of the host it is running on, 
75         but this can be overridden with the <SPAN
76 CLASS="emphasis"
77 ><I
78 CLASS="EMPHASIS"
79 >-n</I
80 ></SPAN
81
82         option (see OPTIONS below). Thus <B
83 CLASS="COMMAND"
84 >nmbd</B
85 > will 
86         reply to broadcast queries for its own name(s). Additional
87         names for <B
88 CLASS="COMMAND"
89 >nmbd</B
90 > to respond on can be set 
91         via parameters in the <A
92 HREF="smb.conf.5.html"
93 TARGET="_top"
94 ><TT
95 CLASS="FILENAME"
96 >       smb.conf(5)</TT
97 ></A
98 > configuration file.</P
99 ><P
100 ><B
101 CLASS="COMMAND"
102 >nmbd</B
103 > can also be used as a WINS 
104         (Windows Internet Name Server) server. What this basically means 
105         is that it will act as a WINS database server, creating a 
106         database from name registration requests that it receives and 
107         replying to queries from clients for these names.</P
108 ><P
109 >In addition, <B
110 CLASS="COMMAND"
111 >nmbd</B
112 > can act as a WINS 
113         proxy, relaying broadcast queries from clients that do 
114         not understand how to talk the WINS protocol to a WINS 
115         server.</P
116 ></DIV
117 ><DIV
118 CLASS="REFSECT1"
119 ><A
120 NAME="AEN40"
121 ></A
122 ><H2
123 >OPTIONS</H2
124 ><P
125 ></P
126 ><DIV
127 CLASS="VARIABLELIST"
128 ><DL
129 ><DT
130 >-D</DT
131 ><DD
132 ><P
133 >If specified, this parameter causes 
134                 <B
135 CLASS="COMMAND"
136 >nmbd</B
137 > to operate as a daemon. That is, 
138                 it detaches itself and runs in the background, fielding 
139                 requests on the appropriate port. By default, <B
140 CLASS="COMMAND"
141 >nmbd</B
142
143                 will operate as a daemon if launched from a command shell. 
144                 nmbd can also be operated from the <B
145 CLASS="COMMAND"
146 >inetd</B
147
148                 meta-daemon, although this is not recommended.
149                 </P
150 ></DD
151 ><DT
152 >-a</DT
153 ><DD
154 ><P
155 >If this parameter is specified, each new 
156                 connection will append log messages to the log file.  
157                 This is the default.</P
158 ></DD
159 ><DT
160 >-i</DT
161 ><DD
162 ><P
163 >If this parameter is specified it causes the
164                 server to run "interactively", not as a daemon, even if the
165                 server is executed on the command line of a shell. Setting this
166                 parameter negates the implicit daemon mode when run from the
167                 command line.
168                 </P
169 ></DD
170 ><DT
171 >-o</DT
172 ><DD
173 ><P
174 >If this parameter is specified, the 
175                 log files will be overwritten when opened.  By default, 
176                 <B
177 CLASS="COMMAND"
178 >smbd</B
179 > will append entries to the log 
180                 files.</P
181 ></DD
182 ><DT
183 >-h</DT
184 ><DD
185 ><P
186 >Prints the help information (usage) 
187                 for <B
188 CLASS="COMMAND"
189 >nmbd</B
190 >.</P
191 ></DD
192 ><DT
193 >-H &lt;filename&gt;</DT
194 ><DD
195 ><P
196 >NetBIOS lmhosts file.  The lmhosts 
197                 file is a list of NetBIOS names to IP addresses that 
198                 is loaded by the nmbd server and used via the name 
199                 resolution mechanism <A
200 HREF="smb.conf.5.html#nameresolveorder"
201 TARGET="_top"
202 >               name resolve order</A
203 > described in <A
204 HREF="smb.conf.5.html"
205 TARGET="_top"
206 > <TT
207 CLASS="FILENAME"
208 >smb.conf(5)</TT
209 ></A
210 >
211                 to resolve any NetBIOS name queries needed by the server. Note 
212                 that the contents of this file are <SPAN
213 CLASS="emphasis"
214 ><I
215 CLASS="EMPHASIS"
216 >NOT</I
217 ></SPAN
218
219                 used by <B
220 CLASS="COMMAND"
221 >nmbd</B
222 > to answer any name queries. 
223                 Adding a line to this file affects name NetBIOS resolution 
224                 from this host <SPAN
225 CLASS="emphasis"
226 ><I
227 CLASS="EMPHASIS"
228 >ONLY</I
229 ></SPAN
230 >.</P
231 ><P
232 >The default path to this file is compiled into 
233                 Samba as part of the build process. Common defaults 
234                 are <TT
235 CLASS="FILENAME"
236 >/usr/local/samba/lib/lmhosts</TT
237 >,
238                 <TT
239 CLASS="FILENAME"
240 >/usr/samba/lib/lmhosts</TT
241 > or
242                 <TT
243 CLASS="FILENAME"
244 >/etc/lmhosts</TT
245 >. See the
246                 <A
247 HREF="lmhosts.5.html"
248 TARGET="_top"
249 ><TT
250 CLASS="FILENAME"
251 >lmhosts(5)</TT
252 ></A
253 >
254                 man page for details on the contents of this file.</P
255 ></DD
256 ><DT
257 >-V</DT
258 ><DD
259 ><P
260 >Prints the version number for 
261                 <B
262 CLASS="COMMAND"
263 >nmbd</B
264 >.</P
265 ></DD
266 ><DT
267 >-d &lt;debug level&gt;</DT
268 ><DD
269 ><P
270 >debuglevel is an integer 
271                 from 0 to 10.  The default value if this parameter is 
272                 not specified is zero.</P
273 ><P
274 >The higher this value, the more detail will 
275                 be logged to the log files about the activities of the 
276                 server. At level 0, only critical errors and serious 
277                 warnings will be logged. Level 1 is a reasonable level for
278                 day to day running - it generates a small amount of 
279                 information about operations carried out.</P
280 ><P
281 >Levels above 1 will generate considerable amounts 
282                 of log data, and should only be used when investigating 
283                 a problem. Levels above 3 are designed for use only by developers 
284                 and generate HUGE amounts of log data, most of which is extremely 
285                 cryptic.</P
286 ><P
287 >Note that specifying this parameter here will override 
288                 the <A
289 HREF="smb.conf.5.html#loglevel"
290 TARGET="_top"
291 >log level</A
292
293                 parameter in the <A
294 HREF="smb.conf.5.html"
295 TARGET="_top"
296 ><TT
297 CLASS="FILENAME"
298 >               smb.conf(5)</TT
299 ></A
300 > file.</P
301 ></DD
302 ><DT
303 >-l &lt;log directory&gt;</DT
304 ><DD
305 ><P
306 >The -l parameter specifies a directory 
307                 into which the "log.nmbd" log file will be created
308                 for operational data from the running <B
309 CLASS="COMMAND"
310 >nmbd</B
311 >
312                 server. The default log directory is compiled into Samba
313                 as part of the build process. Common defaults are <TT
314 CLASS="FILENAME"
315 >               /usr/local/samba/var/log.nmb</TT
316 >, <TT
317 CLASS="FILENAME"
318 >               /usr/samba/var/log.nmb</TT
319 > or
320                 <TT
321 CLASS="FILENAME"
322 >/var/log/log.nmb</TT
323 >.  <SPAN
324 CLASS="emphasis"
325 ><I
326 CLASS="EMPHASIS"
327 >Beware:</I
328 ></SPAN
329 >
330                 If the directory specified does not exist, <B
331 CLASS="COMMAND"
332 >nmbd</B
333 >
334                 will log to the default debug log location defined at compile time.
335                 </P
336 ></DD
337 ><DT
338 >-n &lt;primary NetBIOS name&gt;</DT
339 ><DD
340 ><P
341 >This option allows you to override
342                 the NetBIOS name that Samba uses for itself. This is identical 
343                 to setting the <A
344 HREF="smb.conf.5.html#netbiosname"
345 TARGET="_top"
346 >               NetBIOS name</A
347 > parameter in the <A
348 HREF="smb.conf.5.html"
349 TARGET="_top"
350 >       
351                 <TT
352 CLASS="FILENAME"
353 >smb.conf</TT
354 ></A
355 > file.  However, a command
356                 line setting will take precedence over settings in 
357                 <TT
358 CLASS="FILENAME"
359 >smb.conf</TT
360 >.</P
361 ></DD
362 ><DT
363 >-p &lt;UDP port number&gt;</DT
364 ><DD
365 ><P
366 >UDP port number is a positive integer value.
367                 This option changes the default UDP port number (normally 137)
368                 that <B
369 CLASS="COMMAND"
370 >nmbd</B
371 > responds to name queries on. Don't
372                 use this option unless you are an expert, in which case you
373                 won't need help!</P
374 ></DD
375 ><DT
376 >-s &lt;configuration file&gt;</DT
377 ><DD
378 ><P
379 >The default configuration file name
380                 is set at build time, typically as <TT
381 CLASS="FILENAME"
382 >               /usr/local/samba/lib/smb.conf</TT
383 >, but
384                 this may be changed when Samba is autoconfigured.</P
385 ><P
386 >The file specified contains the configuration details
387                 required by the server. See <A
388 HREF="smb.conf.5.html"
389 TARGET="_top"
390 >               <TT
391 CLASS="FILENAME"
392 >smb.conf(5)</TT
393 ></A
394 > for more information.
395                 </P
396 ></DD
397 ></DL
398 ></DIV
399 ></DIV
400 ><DIV
401 CLASS="REFSECT1"
402 ><A
403 NAME="AEN130"
404 ></A
405 ><H2
406 >FILES</H2
407 ><P
408 ></P
409 ><DIV
410 CLASS="VARIABLELIST"
411 ><DL
412 ><DT
413 ><TT
414 CLASS="FILENAME"
415 >/etc/inetd.conf</TT
416 ></DT
417 ><DD
418 ><P
419 >If the server is to be run by the
420                 <B
421 CLASS="COMMAND"
422 >inetd</B
423 > meta-daemon, this file
424                 must contain suitable startup information for the
425                 meta-daemon. See the <A
426 HREF="UNIX_INSTALL.html"
427 TARGET="_top"
428 >UNIX_INSTALL.html</A
429 > document
430                 for details.
431                 </P
432 ></DD
433 ><DT
434 ><TT
435 CLASS="FILENAME"
436 >/etc/rc</TT
437 ></DT
438 ><DD
439 ><P
440 >or whatever initialization script your
441                 system uses).</P
442 ><P
443 >If running the server as a daemon at startup,
444                 this file will need to contain an appropriate startup
445                 sequence for the server. See the <A
446 HREF="UNIX_INSTALL.html"
447 TARGET="_top"
448 >UNIX_INSTALL.html</A
449 > document
450                 for details.</P
451 ></DD
452 ><DT
453 ><TT
454 CLASS="FILENAME"
455 >/etc/services</TT
456 ></DT
457 ><DD
458 ><P
459 >If running the server via the
460                 meta-daemon <B
461 CLASS="COMMAND"
462 >inetd</B
463 >, this file
464                 must contain a mapping of service name (e.g., netbios-ssn)
465                 to service port (e.g., 139) and protocol type (e.g., tcp).
466                 See the <A
467 HREF="UNIX_INSTALL.html"
468 TARGET="_top"
469 >UNIX_INSTALL.html</A
470 >
471                 document for details.</P
472 ></DD
473 ><DT
474 ><TT
475 CLASS="FILENAME"
476 >/usr/local/samba/lib/smb.conf</TT
477 ></DT
478 ><DD
479 ><P
480 >This is the default location of the
481                 <A
482 HREF="smb.conf.5.html"
483 TARGET="_top"
484 ><TT
485 CLASS="FILENAME"
486 >smb.conf</TT
487 ></A
488 >
489                 server configuration file. Other common places that systems
490                 install this file are <TT
491 CLASS="FILENAME"
492 >/usr/samba/lib/smb.conf</TT
493 >
494                 and <TT
495 CLASS="FILENAME"
496 >/etc/smb.conf</TT
497 >.</P
498 ><P
499 >When run as a WINS server (see the
500                 <A
501 HREF="smb.conf.5.html#WINSSUPPORT"
502 TARGET="_top"
503 >wins support</A
504 >
505                 parameter in the <TT
506 CLASS="FILENAME"
507 >smb.conf(5)</TT
508 > man page),
509                 <B
510 CLASS="COMMAND"
511 >nmbd</B
512 >
513                 will store the WINS database in the file <TT
514 CLASS="FILENAME"
515 >wins.dat</TT
516 >
517                 in the <TT
518 CLASS="FILENAME"
519 >var/locks</TT
520 > directory configured under
521                 wherever Samba was configured to install itself.</P
522 ><P
523 >If <B
524 CLASS="COMMAND"
525 >nmbd</B
526 > is acting as a <SPAN
527 CLASS="emphasis"
528 ><I
529 CLASS="EMPHASIS"
530 >               browse master</I
531 ></SPAN
532 > (see the <A
533 HREF="smb.conf.5.html#LOCALMASTER"
534 TARGET="_top"
535 >local master</A
536 >
537                 parameter in the <TT
538 CLASS="FILENAME"
539 >smb.conf(5)</TT
540 > man page,
541                 <B
542 CLASS="COMMAND"
543 >nmbd</B
544 >
545                 will store the browsing database in the file <TT
546 CLASS="FILENAME"
547 >browse.dat
548                 </TT
549 > in the <TT
550 CLASS="FILENAME"
551 >var/locks</TT
552 > directory
553                 configured under wherever Samba was configured to install itself.
554                 </P
555 ></DD
556 ></DL
557 ></DIV
558 ></DIV
559 ><DIV
560 CLASS="REFSECT1"
561 ><A
562 NAME="AEN177"
563 ></A
564 ><H2
565 >SIGNALS</H2
566 ><P
567 >To shut down an <B
568 CLASS="COMMAND"
569 >nmbd</B
570 > process it is recommended
571         that SIGKILL (-9) <SPAN
572 CLASS="emphasis"
573 ><I
574 CLASS="EMPHASIS"
575 >NOT</I
576 ></SPAN
577 > be used, except as a last
578         resort, as this may leave the name database in an inconsistent state.
579         The correct way to terminate <B
580 CLASS="COMMAND"
581 >nmbd</B
582 > is to send it
583         a SIGTERM (-15) signal and wait for it to die on its own.</P
584 ><P
585 ><B
586 CLASS="COMMAND"
587 >nmbd</B
588 > will accept SIGHUP, which will cause
589         it to dump out its namelists into the file <TT
590 CLASS="FILENAME"
591 >namelist.debug
592         </TT
593 > in the <TT
594 CLASS="FILENAME"
595 >/usr/local/samba/var/locks</TT
596 >
597         directory (or the <TT
598 CLASS="FILENAME"
599 >var/locks</TT
600 > directory configured
601         under wherever Samba was configured to install itself). This will also
602         cause <B
603 CLASS="COMMAND"
604 >nmbd</B
605 > to dump out its server database in
606         the <TT
607 CLASS="FILENAME"
608 >log.nmb</TT
609 > file.</P
610 ><P
611 >The debug log level of nmbd may be raised or lowered using
612         <A
613 HREF="smbcontrol.1.html"
614 TARGET="_top"
615 ><B
616 CLASS="COMMAND"
617 >smbcontrol(1)</B
618 >
619         </A
620 > (SIGUSR[1|2] signals are no longer used in Samba 2.2). This is
621         to allow transient problems to be diagnosed, whilst still running
622         at a normally low log level.</P
623 ></DIV
624 ><DIV
625 CLASS="REFSECT1"
626 ><A
627 NAME="AEN193"
628 ></A
629 ><H2
630 >VERSION</H2
631 ><P
632 >This man page is correct for version 3.0 of 
633         the Samba suite.</P
634 ></DIV
635 ><DIV
636 CLASS="REFSECT1"
637 ><A
638 NAME="AEN196"
639 ></A
640 ><H2
641 >SEE ALSO</H2
642 ><P
643 ><B
644 CLASS="COMMAND"
645 >inetd(8)</B
646 >, <A
647 HREF="smbd.8.html"
648 TARGET="_top"
649 ><B
650 CLASS="COMMAND"
651 >smbd(8)</B
652 ></A
653 >, 
654         <A
655 HREF="smb.conf.5.html"
656 TARGET="_top"
657 ><TT
658 CLASS="FILENAME"
659 >smb.conf(5)</TT
660 >
661         </A
662 >, <A
663 HREF="smbclient.1.html"
664 TARGET="_top"
665 ><B
666 CLASS="COMMAND"
667 >smbclient(1)
668         </B
669 ></A
670 >, <A
671 HREF="testparm.1.html"
672 TARGET="_top"
673 ><B
674 CLASS="COMMAND"
675 >       testparm(1)</B
676 ></A
677 >, <A
678 HREF="testprns.1.html"
679 TARGET="_top"
680 >       <B
681 CLASS="COMMAND"
682 >testprns(1)</B
683 ></A
684 >, and the Internet RFC's
685         <TT
686 CLASS="FILENAME"
687 >rfc1001.txt</TT
688 >, <TT
689 CLASS="FILENAME"
690 >rfc1002.txt</TT
691 >. 
692         In addition the CIFS (formerly SMB) specification is available 
693         as a link from the Web page <A
694 HREF="http://samba.org/cifs/"
695 TARGET="_top"
696
697         http://samba.org/cifs/</A
698 >.</P
699 ></DIV
700 ><DIV
701 CLASS="REFSECT1"
702 ><A
703 NAME="AEN213"
704 ></A
705 ><H2
706 >AUTHOR</H2
707 ><P
708 >The original Samba software and related utilities 
709         were created by Andrew Tridgell. Samba is now developed
710         by the Samba Team as an Open Source project similar 
711         to the way the Linux kernel is developed.</P
712 ><P
713 >The original Samba man pages were written by Karl Auer. 
714         The man page sources were converted to YODL format (another 
715         excellent piece of Open Source software, available at
716         <A
717 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
718 TARGET="_top"
719 >       ftp://ftp.icce.rug.nl/pub/unix/</A
720 >) and updated for the Samba 2.0 
721         release by Jeremy Allison.  The conversion to DocBook for 
722         Samba 2.2 was done by Gerald Carter</P
723 ></DIV
724 ></BODY
725 ></HTML
726 >