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