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