This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.
[kai/samba.git] / docs / docbook / manpages / nmbd.8.sgml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="nmbd">
3
4 <refmeta>
5         <refentrytitle>nmbd</refentrytitle>
6         <manvolnum>8</manvolnum>
7 </refmeta>
8
9
10 <refnamediv>
11         <refname>nmbd</refname>
12         <refpurpose>NetBIOS name server to provide NetBIOS 
13         over IP naming services to clients</refpurpose>
14 </refnamediv>
15
16 <refsynopsisdiv>
17         <cmdsynopsis>
18                 <command>nmbd</command>
19                 <arg choice="opt">-D</arg>
20                 <arg choice="opt">-F</arg>
21                 <arg choice="opt">-S</arg>
22                 <arg choice="opt">-a</arg>
23                 <arg choice="opt">-i</arg>
24                 <arg choice="opt">-o</arg>
25                 <arg choice="opt">-h</arg>
26                 <arg choice="opt">-V</arg>
27                 <arg choice="opt">-d &lt;debug level&gt;</arg>
28                 <arg choice="opt">-H &lt;lmhosts file&gt;</arg>
29                 <arg choice="opt">-l &lt;log directory&gt;</arg>
30                 <arg choice="opt">-n &lt;primary netbios name&gt;</arg>
31                 <arg choice="opt">-p &lt;port number&gt;</arg>
32                 <arg choice="opt">-s &lt;configuration file&gt;</arg>
33         </cmdsynopsis>
34 </refsynopsisdiv>
35
36 <refsect1>
37         <title>DESCRIPTION</title>
38         <para>This program is part of the Samba suite.</para>
39
40         <para><command>nmbd</command> is a server that understands 
41         and can reply to NetBIOS over IP name service requests, like 
42         those produced by SMB/CIFS clients such as Windows 95/98/ME, 
43         Windows NT, Windows 2000, Windows XP and LanManager clients. It also
44         participates in the browsing protocols which make up the 
45         Windows "Network Neighborhood" view.</para>
46
47         <para>SMB/CIFS clients, when they start up, may wish to 
48         locate an SMB/CIFS server. That is, they wish to know what 
49         IP number a specified host is using.</para>
50
51         <para>Amongst other services, <command>nmbd</command> will 
52         listen for such requests, and if its own NetBIOS name is 
53         specified it will respond with the IP number of the host it 
54         is running on.  Its "own NetBIOS name" is by
55         default the primary DNS name of the host it is running on, 
56         but this can be overridden with the <emphasis>-n</emphasis> 
57         option (see OPTIONS below). Thus <command>nmbd</command> will 
58         reply to broadcast queries for its own name(s). Additional
59         names for <command>nmbd</command> to respond on can be set 
60         via parameters in the <ulink url="smb.conf.5.html"><filename>
61         smb.conf(5)</filename></ulink> configuration file.</para>
62
63         <para><command>nmbd</command> can also be used as a WINS 
64         (Windows Internet Name Server) server. What this basically means 
65         is that it will act as a WINS database server, creating a 
66         database from name registration requests that it receives and 
67         replying to queries from clients for these names.</para>
68
69         <para>In addition, <command>nmbd</command> can act as a WINS 
70         proxy, relaying broadcast queries from clients that do 
71         not understand how to talk the WINS protocol to a WINS 
72         server.</para>
73 </refsect1>
74
75 <refsect1>
76         <title>OPTIONS</title>
77
78         <variablelist>
79                 <varlistentry>
80                 <term>-D</term>
81                 <listitem><para>If specified, this parameter causes 
82                 <command>nmbd</command> to operate as a daemon. That is, 
83                 it detaches itself and runs in the background, fielding 
84                 requests on the appropriate port. By default, <command>nmbd</command> 
85                 will operate as a daemon if launched from a command shell. 
86                 nmbd can also be operated from the <command>inetd</command> 
87                 meta-daemon, although this is not recommended.
88                 </para></listitem>
89                 </varlistentry>
90
91                 <varlistentry>
92                 <term>-F</term>
93                 <listitem><para>If specified, this parameter causes
94                 the main <command>nmbd</command> process to not daemonize,
95                 i.e. double-fork and disassociate with the terminal.
96                 Child processes are still created as normal to service
97                 each connection request, but the main process does not
98                 exit. This operation mode is suitable for running
99                 <command>nmbd</command> under process supervisors such
100                 as <command>supervise</command> and <command>svscan</command>
101                 from Daniel J. Bernstein's <command>daemontools</command>
102                 package, or the AIX process monitor.
103                 </para></listitem>
104                 </varlistentry>
105
106                 <varlistentry>
107                 <term>-S</term>
108                 <listitem><para>If specified, this parameter causes
109                 <command>nmbd</command> to log to standard output rather
110                 than a file.</para></listitem>
111                 </varlistentry>
112
113                 <varlistentry>
114                 <term>-a</term>
115                 <listitem><para>If this parameter is specified, each new 
116                 connection will append log messages to the log file.  
117                 This is the default.</para></listitem>
118                 </varlistentry>
119                 
120                 <varlistentry>
121                 <term>-i</term>
122                 <listitem><para>If this parameter is specified it causes the
123                 server to run "interactively", not as a daemon, even if the
124                 server is executed on the command line of a shell. Setting this
125                 parameter negates the implicit daemon mode when run from the
126                 command line. <command>nmbd</command> also logs to standard
127                 output, as if the <command>-S</command> parameter had been
128                 given. </para></listitem>
129                 </varlistentry>
130
131                 <varlistentry>
132                 <term>-o</term>
133                 <listitem><para>If this parameter is specified, the 
134                 log files will be overwritten when opened.  By default, 
135                 <command>smbd</command> will append entries to the log 
136                 files.</para></listitem>
137                 </varlistentry>
138                 
139                 <varlistentry>
140                 <term>-h</term>
141                 <listitem><para>Prints the help information (usage) 
142                 for <command>nmbd</command>.</para></listitem>
143                 </varlistentry>
144                 
145                 <varlistentry>
146                 <term>-H &lt;filename&gt;</term>
147                 <listitem><para>NetBIOS lmhosts file.  The lmhosts 
148                 file is a list of NetBIOS names to IP addresses that 
149                 is loaded by the nmbd server and used via the name 
150                 resolution mechanism <ulink url="smb.conf.5.html#nameresolveorder">
151                 name resolve order</ulink> described in <ulink 
152                 url="smb.conf.5.html"> <filename>smb.conf(5)</filename></ulink>
153                 to resolve any NetBIOS name queries needed by the server. Note 
154                 that the contents of this file are <emphasis>NOT</emphasis> 
155                 used by <command>nmbd</command> to answer any name queries. 
156                 Adding a line to this file affects name NetBIOS resolution 
157                 from this host <emphasis>ONLY</emphasis>.</para>
158
159                 <para>The default path to this file is compiled into 
160                 Samba as part of the build process. Common defaults 
161                 are <filename>/usr/local/samba/lib/lmhosts</filename>,
162                 <filename>/usr/samba/lib/lmhosts</filename> or
163                 <filename>/etc/lmhosts</filename>. See the
164                 <ulink url="lmhosts.5.html"><filename>lmhosts(5)</filename></ulink>
165                 man page for details on the contents of this file.</para></listitem>
166                 </varlistentry>
167
168                 <varlistentry>
169                 <term>-V</term>
170                 <listitem><para>Prints the version number for 
171                 <command>nmbd</command>.</para></listitem>
172                 </varlistentry>
173                 
174                 <varlistentry>
175                 <term>-d &lt;debug level&gt;</term>
176                 <listitem><para>debuglevel is an integer 
177                 from 0 to 10.  The default value if this parameter is 
178                 not specified is zero.</para>
179                 
180                 <para>The higher this value, the more detail will 
181                 be logged to the log files about the activities of the 
182                 server. At level 0, only critical errors and serious 
183                 warnings will be logged. Level 1 is a reasonable level for
184                 day to day running - it generates a small amount of 
185                 information about operations carried out.</para>
186
187                 <para>Levels above 1 will generate considerable amounts 
188                 of log data, and should only be used when investigating 
189                 a problem. Levels above 3 are designed for use only by developers 
190                 and generate HUGE amounts of log data, most of which is extremely 
191                 cryptic.</para>
192
193                 <para>Note that specifying this parameter here will override 
194                 the <ulink url="smb.conf.5.html#loglevel">log level</ulink> 
195                 parameter in the <ulink url="smb.conf.5.html"><filename>
196                 smb.conf(5)</filename></ulink> file.</para></listitem>
197                 </varlistentry>
198                 
199                 <varlistentry>
200                 <term>-l &lt;log directory&gt;</term>
201                 <listitem><para>The -l parameter specifies a directory 
202                 into which the "log.nmbd" log file will be created
203                 for operational data from the running <command>nmbd</command>
204                 server. The default log directory is compiled into Samba
205                 as part of the build process. Common defaults are <filename>
206                 /usr/local/samba/var/log.nmb</filename>, <filename>
207                 /usr/samba/var/log.nmb</filename> or
208                 <filename>/var/log/log.nmb</filename>.  <emphasis>Beware:</emphasis>
209                 If the directory specified does not exist, <command>nmbd</command>
210                 will log to the default debug log location defined at compile time.
211                 </para></listitem>
212                 </varlistentry>
213                 
214                 
215                 <varlistentry>
216                 <term>-n &lt;primary NetBIOS name&gt;</term>
217                 <listitem><para>This option allows you to override
218                 the NetBIOS name that Samba uses for itself. This is identical 
219                 to setting the <ulink url="smb.conf.5.html#netbiosname">
220                 NetBIOS name</ulink> parameter in the <ulink url="smb.conf.5.html">     
221                 <filename>smb.conf</filename></ulink> file.  However, a command
222                 line setting will take precedence over settings in 
223                 <filename>smb.conf</filename>.</para></listitem>
224                 </varlistentry>
225
226
227                 <varlistentry>
228                 <term>-p &lt;UDP port number&gt;</term>
229                 <listitem><para>UDP port number is a positive integer value.
230                 This option changes the default UDP port number (normally 137)
231                 that <command>nmbd</command> responds to name queries on. Don't
232                 use this option unless you are an expert, in which case you
233                 won't need help!</para></listitem>
234                 </varlistentry>
235
236                 <varlistentry>
237                 <term>-s &lt;configuration file&gt;</term>
238                 <listitem><para>The default configuration file name
239                 is set at build time, typically as <filename>
240                 /usr/local/samba/lib/smb.conf</filename>, but
241                 this may be changed when Samba is autoconfigured.</para>
242
243                 <para>The file specified contains the configuration details
244                 required by the server. See <ulink url="smb.conf.5.html">
245                 <filename>smb.conf(5)</filename></ulink> for more information.
246                 </para></listitem>
247                 </varlistentry>
248         </variablelist>
249 </refsect1>
250
251 <refsect1>
252         <title>FILES</title>
253
254         <variablelist>
255                 <varlistentry>
256                 <term><filename>/etc/inetd.conf</filename></term>
257                 <listitem><para>If the server is to be run by the
258                 <command>inetd</command> meta-daemon, this file
259                 must contain suitable startup information for the
260                 meta-daemon. See the <ulink
261                 url="UNIX_INSTALL.html">UNIX_INSTALL.html</ulink> document
262                 for details.
263                 </para></listitem>
264                 </varlistentry>
265
266                 <varlistentry>
267                 <term><filename>/etc/rc</filename></term>
268                 <listitem><para>or whatever initialization script your
269                 system uses).</para>
270
271                 <para>If running the server as a daemon at startup,
272                 this file will need to contain an appropriate startup
273                 sequence for the server. See the <ulink
274                 url="UNIX_INSTALL.html">UNIX_INSTALL.html</ulink> document
275                 for details.</para></listitem>
276                 </varlistentry>
277
278                 <varlistentry>
279                 <term><filename>/etc/services</filename></term>
280                 <listitem><para>If running the server via the
281                 meta-daemon <command>inetd</command>, this file
282                 must contain a mapping of service name (e.g., netbios-ssn)
283                 to service port (e.g., 139) and protocol type (e.g., tcp).
284                 See the <ulink url="UNIX_INSTALL.html">UNIX_INSTALL.html</ulink>
285                 document for details.</para></listitem>
286                 </varlistentry>
287
288                 <varlistentry>
289                 <term><filename>/usr/local/samba/lib/smb.conf</filename></term>
290                 <listitem><para>This is the default location of the
291                 <ulink url="smb.conf.5.html"><filename>smb.conf</filename></ulink>
292                 server configuration file. Other common places that systems
293                 install this file are <filename>/usr/samba/lib/smb.conf</filename>
294                 and <filename>/etc/smb.conf</filename>.</para>
295
296                 <para>When run as a WINS server (see the
297                 <ulink url="smb.conf.5.html#WINSSUPPORT">wins support</ulink>
298                 parameter in the <filename>smb.conf(5)</filename> man page),
299                 <command>nmbd</command>
300                 will store the WINS database in the file <filename>wins.dat</filename>
301                 in the <filename>var/locks</filename> directory configured under
302                 wherever Samba was configured to install itself.</para>
303
304                 <para>If <command>nmbd</command> is acting as a <emphasis>
305                 browse master</emphasis> (see the <ulink
306                 url="smb.conf.5.html#LOCALMASTER">local master</ulink>
307                 parameter in the <filename>smb.conf(5)</filename> man page,
308                 <command>nmbd</command>
309                 will store the browsing database in the file <filename>browse.dat
310                 </filename> in the <filename>var/locks</filename> directory
311                 configured under wherever Samba was configured to install itself.
312                 </para></listitem>
313                 </varlistentry>
314         </variablelist>
315 </refsect1>
316
317 <refsect1>
318         <title>SIGNALS</title>
319
320         <para>To shut down an <command>nmbd</command> process it is recommended
321         that SIGKILL (-9) <emphasis>NOT</emphasis> be used, except as a last
322         resort, as this may leave the name database in an inconsistent state.
323         The correct way to terminate <command>nmbd</command> is to send it
324         a SIGTERM (-15) signal and wait for it to die on its own.</para>
325
326         <para><command>nmbd</command> will accept SIGHUP, which will cause
327         it to dump out its namelists into the file <filename>namelist.debug
328         </filename> in the <filename>/usr/local/samba/var/locks</filename>
329         directory (or the <filename>var/locks</filename> directory configured
330         under wherever Samba was configured to install itself). This will also
331         cause <command>nmbd</command> to dump out its server database in
332         the <filename>log.nmb</filename> file.</para>
333
334         <para>The debug log level of nmbd may be raised or lowered using
335         <ulink url="smbcontrol.1.html"><command>smbcontrol(1)</command>
336         </ulink> (SIGUSR[1|2] signals are no longer used in Samba 2.2). This is
337         to allow transient problems to be diagnosed, whilst still running
338         at a normally low log level.</para>
339 </refsect1>
340
341
342 <refsect1>
343         <title>VERSION</title>
344
345         <para>This man page is correct for version 3.0 of 
346         the Samba suite.</para>
347 </refsect1>
348
349 <refsect1>
350         <title>SEE ALSO</title>
351         <para><command>inetd(8)</command>, <ulink
352         url="smbd.8.html"><command>smbd(8)</command></ulink>, 
353         <ulink url="smb.conf.5.html"><filename>smb.conf(5)</filename>
354         </ulink>, <ulink url="smbclient.1.html"><command>smbclient(1)
355         </command></ulink>, <ulink url="testparm.1.html"><command>
356         testparm(1)</command></ulink>, <ulink url="testprns.1.html">
357         <command>testprns(1)</command></ulink>, and the Internet RFC's
358         <filename>rfc1001.txt</filename>, <filename>rfc1002.txt</filename>. 
359         In addition the CIFS (formerly SMB) specification is available 
360         as a link from the Web page <ulink url="http://samba.org/cifs/"> 
361         http://samba.org/cifs/</ulink>.</para>
362 </refsect1>
363
364 <refsect1>
365         <title>AUTHOR</title>
366         
367         <para>The original Samba software and related utilities 
368         were created by Andrew Tridgell. Samba is now developed
369         by the Samba Team as an Open Source project similar 
370         to the way the Linux kernel is developed.</para>
371         
372         <para>The original Samba man pages were written by Karl Auer. 
373         The man page sources were converted to YODL format (another 
374         excellent piece of Open Source software, available at
375         <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
376         ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0 
377         release by Jeremy Allison.  The conversion to DocBook for 
378         Samba 2.2 was done by Gerald Carter</para>
379 </refsect1>
380
381 </refentry>