1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
5 <refentrytitle>nmbd</refentrytitle>
6 <manvolnum>8</manvolnum>
11 <refname>nmbd</refname>
12 <refpurpose>NetBIOS name server to provide NetBIOS
13 over IP naming services to clients</refpurpose>
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 <debug level></arg>
28 <arg choice="opt">-H <lmhosts file></arg>
29 <arg choice="opt">-l <log directory></arg>
30 <arg choice="opt">-n <primary netbios name></arg>
31 <arg choice="opt">-p <port number></arg>
32 <arg choice="opt">-s <configuration file></arg>
37 <title>DESCRIPTION</title>
38 <para>This program is part of the Samba suite.</para>
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>
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>
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>
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>
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
76 <title>OPTIONS</title>
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.
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.
108 <listitem><para>If specified, this parameter causes
109 <command>nmbd</command> to log to standard output rather
110 than a file.</para></listitem>
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>
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>
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>
141 <listitem><para>Prints the help information (usage)
142 for <command>nmbd</command>.</para></listitem>
146 <term>-H <filename></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>
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>
170 <listitem><para>Prints the version number for
171 <command>nmbd</command>.</para></listitem>
175 <term>-d <debug level></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>
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>
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
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>
200 <term>-l <log directory></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.
216 <term>-n <primary NetBIOS name></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>
228 <term>-p <UDP port number></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>
237 <term>-s <configuration file></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>
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.
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
267 <term><filename>/etc/rc</filename></term>
268 <listitem><para>or whatever initialization script your
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>
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>
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>
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>
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.
318 <title>SIGNALS</title>
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>
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>
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>
343 <title>VERSION</title>
345 <para>This man page is correct for version 3.0 of
346 the Samba suite.</para>
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>
365 <title>AUTHOR</title>
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>
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>