1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
6 <refentrytitle>nmbd</refentrytitle>
7 <manvolnum>8</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10 <refmiscinfo class="version">&doc.version;</refmiscinfo>
15 <refname>nmbd</refname>
16 <refpurpose>NetBIOS name server to provide NetBIOS
17 over IP naming services to clients</refpurpose>
22 <command>nmbd</command>
23 <arg choice="opt">-D|--daemon</arg>
24 <arg choice="opt">-i|--interactive</arg>
25 <arg choice="opt">-F|--foreground</arg>
26 <arg choice="opt">--no-process-group</arg>
27 <arg choice="opt">-b|--build-options</arg>
28 <arg choice="opt">-p <port number(s)></arg>
29 <arg choice="opt">-P <profiling level></arg>
30 <arg choice="opt">-d <debug level></arg>
31 <arg choice="opt">--debug-stdout</arg>
32 <arg choice="opt">--configfile=<configuration file></arg>
33 <arg choice="opt">--option=<name>=<value></arg>
34 <arg choice="opt">-l|--log-basename <log directory></arg>
35 <arg choice="opt">--leak-report</arg>
36 <arg choice="opt">--leak-report-full</arg>
37 <arg choice="opt">-V|--version</arg>
42 <title>DESCRIPTION</title>
43 <para>This program is part of the <citerefentry><refentrytitle>samba</refentrytitle>
44 <manvolnum>7</manvolnum></citerefentry> suite.</para>
46 <para><command>nmbd</command> is a server that understands
47 and can reply to NetBIOS over IP name service requests, like
48 those produced by SMB/CIFS clients such as Windows 95/98/ME,
49 Windows NT, Windows 2000, Windows XP and LanManager clients. It also
50 participates in the browsing protocols which make up the
51 Windows "Network Neighborhood" view.</para>
53 <para>SMB/CIFS clients, when they start up, may wish to
54 locate an SMB/CIFS server. That is, they wish to know what
55 IP number a specified host is using.</para>
57 <para>Amongst other services, <command>nmbd</command> will
58 listen for such requests, and if its own NetBIOS name is
59 specified it will respond with the IP number of the host it
60 is running on. Its "own NetBIOS name" is by
61 default the primary DNS name of the host it is running on,
62 but this can be overridden by the <smbconfoption name="netbios name"/>
63 in &smb.conf;. Thus <command>nmbd</command> will
64 reply to broadcast queries for its own name(s). Additional
65 names for <command>nmbd</command> to respond on can be set
66 via parameters in the <citerefentry><refentrytitle>smb.conf</refentrytitle>
67 <manvolnum>5</manvolnum></citerefentry> configuration file.</para>
69 <para><command>nmbd</command> can also be used as a WINS
70 (Windows Internet Name Server) server. What this basically means
71 is that it will act as a WINS database server, creating a
72 database from name registration requests that it receives and
73 replying to queries from clients for these names.</para>
75 <para>In addition, <command>nmbd</command> can act as a WINS
76 proxy, relaying broadcast queries from clients that do
77 not understand how to talk the WINS protocol to a WINS
82 <title>OPTIONS</title>
86 <term>-D|--daemon</term>
87 <listitem><para>If specified, this parameter causes
88 <command>nmbd</command> to operate as a daemon. That is,
89 it detaches itself and runs in the background, fielding
90 requests on the appropriate port. By default, <command>nmbd</command>
91 will operate as a daemon if launched from a command shell.
92 nmbd can also be operated from the <command>inetd</command>
93 meta-daemon, although this is not recommended.
98 <term>-F|--foreground</term>
99 <listitem><para>If specified, this parameter causes
100 the main <command>nmbd</command> process to not daemonize,
101 i.e. double-fork and disassociate with the terminal.
102 Child processes are still created as normal to service
103 each connection request, but the main process does not
104 exit. This operation mode is suitable for running
105 <command>nmbd</command> under process supervisors such
106 as <command>supervise</command> and <command>svscan</command>
107 from Daniel J. Bernstein's <command>daemontools</command>
108 package, or the AIX process monitor.
113 <term>-i|--interactive</term>
114 <listitem><para>If this parameter is specified it causes the
115 server to run "interactively", not as a daemon, even if the
116 server is executed on the command line of a shell. Setting this
117 parameter negates the implicit daemon mode when run from the
118 command line. <command>nmbd</command> also logs to standard
119 output, as if the <constant>-S</constant> parameter had been
120 given. </para></listitem>
124 <term>-H|--hosts <filename></term>
125 <listitem><para>NetBIOS lmhosts file. The lmhosts
126 file is a list of NetBIOS names to IP addresses that
127 is loaded by the nmbd server and used via the name
128 resolution mechanism <smbconfoption name="name resolve order"/> described in <citerefentry><refentrytitle>smb.conf</refentrytitle>
129 <manvolnum>5</manvolnum></citerefentry> to resolve any
130 NetBIOS name queries needed by the server. Note
131 that the contents of this file are <emphasis>NOT</emphasis>
132 used by <command>nmbd</command> to answer any name queries.
133 Adding a line to this file affects name NetBIOS resolution
134 from this host <emphasis>ONLY</emphasis>.</para>
136 <para>The default path to this file is compiled into
137 Samba as part of the build process. Common defaults
138 are <filename>/usr/local/samba/lib/lmhosts</filename>,
139 <filename>/usr/samba/lib/lmhosts</filename> or
140 <filename>/etc/samba/lmhosts</filename>. See the <citerefentry><refentrytitle>lmhosts</refentrytitle>
141 <manvolnum>5</manvolnum></citerefentry> man page for details on the contents of this file.</para></listitem>
145 <term>-p|--port <UDP port number></term>
146 <listitem><para>UDP port number is a positive integer value.
147 This option changes the default UDP port number (normally 137)
148 that <command>nmbd</command> responds to name queries on. Don't
149 use this option unless you are an expert, in which case you
150 won't need help!</para></listitem>
154 <term>--no-process-group</term>
155 <listitem><para>Do not create a new process group for nmbd.
159 &cmdline.common.samba.server;
169 <term><filename>/etc/inetd.conf</filename></term>
170 <listitem><para>If the server is to be run by the
171 <command>inetd</command> meta-daemon, this file
172 must contain suitable startup information for the
178 <term><filename>/etc/rc</filename></term>
179 <listitem><para>or whatever initialization script your
182 <para>If running the server as a daemon at startup,
183 this file will need to contain an appropriate startup
184 sequence for the server.</para></listitem>
188 <term><filename>/etc/services</filename></term>
189 <listitem><para>If running the server via the
190 meta-daemon <command>inetd</command>, this file
191 must contain a mapping of service name (e.g., netbios-ssn)
192 to service port (e.g., 139) and protocol type (e.g., tcp).
197 <term><filename>/usr/local/samba/lib/smb.conf</filename></term>
198 <listitem><para>This is the default location of
199 the <citerefentry><refentrytitle>smb.conf</refentrytitle>
200 <manvolnum>5</manvolnum></citerefentry> server
201 configuration file. Other common places that systems
202 install this file are <filename>/usr/samba/lib/smb.conf</filename>
203 and <filename>/etc/samba/smb.conf</filename>.</para>
205 <para>When run as a WINS server (see the
206 <smbconfoption name="wins support"/>
207 parameter in the <citerefentry><refentrytitle>smb.conf</refentrytitle>
208 <manvolnum>5</manvolnum></citerefentry> man page),
209 <command>nmbd</command>
210 will store the WINS database in the file <filename>wins.dat</filename>
211 in the <filename>var/locks</filename> directory configured under
212 wherever Samba was configured to install itself.</para>
214 <para>If <command>nmbd</command> is acting as a <emphasis>
215 browse master</emphasis> (see the <smbconfoption name="local master"/>
216 parameter in the <citerefentry><refentrytitle>smb.conf</refentrytitle>
217 <manvolnum>5</manvolnum></citerefentry> man page, <command>nmbd</command>
218 will store the browsing database in the file <filename>browse.dat
219 </filename> in the <filename>var/locks</filename> directory
220 configured under wherever Samba was configured to install itself.
227 <title>SIGNALS</title>
229 <para>To shut down an <command>nmbd</command> process it is recommended
230 that SIGKILL (-9) <emphasis>NOT</emphasis> be used, except as a last
231 resort, as this may leave the name database in an inconsistent state.
232 The correct way to terminate <command>nmbd</command> is to send it
233 a SIGTERM (-15) signal and wait for it to die on its own.</para>
235 <para><command>nmbd</command> will accept SIGHUP, which will cause
236 it to dump out its namelists into the file <filename>namelist.debug
237 </filename> in the <filename>/usr/local/samba/var/locks</filename>
238 directory (or the <filename>var/locks</filename> directory configured
239 under wherever Samba was configured to install itself). This will also
240 cause <command>nmbd</command> to dump out its server database in
241 the <filename>log.nmb</filename> file. Additionally, the signal will
242 cause reloading <command>nmbd</command> configuration.</para>
245 Instead of sending a SIGHUP signal, a request to dump namelists
246 into the file and reload a configuration file may be sent using
247 <citerefentry><refentrytitle>smbcontrol</refentrytitle>
248 <manvolnum>1</manvolnum></citerefentry> program.
251 <para>The debug log level of nmbd may be raised or lowered
252 using <citerefentry><refentrytitle>smbcontrol</refentrytitle>
253 <manvolnum>1</manvolnum></citerefentry> (SIGUSR[1|2] signals
254 are no longer used since Samba 2.2). This is to allow
255 transient problems to be diagnosed, whilst still running
256 at a normally low log level.</para>
261 <title>VERSION</title>
263 <para>This man page is part of version &doc.version; of
264 the Samba suite.</para>
268 <title>SEE ALSO</title>
270 <citerefentry><refentrytitle>inetd</refentrytitle>
271 <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>smbd</refentrytitle>
272 <manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>smb.conf</refentrytitle>
273 <manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>smbclient</refentrytitle>
274 <manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>testparm</refentrytitle>
275 <manvolnum>1</manvolnum></citerefentry>, and the Internet
276 RFC's <filename>rfc1001.txt</filename>, <filename>rfc1002.txt</filename>.
277 In addition the CIFS (formerly SMB) specification is available
278 as a link from the Web page <ulink noescape="1" url="https://www.samba.org/cifs/">
279 https://www.samba.org/cifs/</ulink>.</para>
283 <title>AUTHOR</title>
285 <para>The original Samba software and related utilities
286 were created by Andrew Tridgell. Samba is now developed
287 by the Samba Team as an Open Source project similar
288 to the way the Linux kernel is developed.</para>