syncing up with SAMBA_2_2
[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>smbd</command>
19                 <arg choice="opt">-D</arg>
20                 <arg choice="opt">-a</arg>
21                 <arg choice="opt">-o</arg>
22                 <arg choice="opt">-P</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 file&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, 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 WIN 
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>-o</term>
98                 <listitem><para>If this parameter is specified, the 
99                 log files will be overwritten when opened.  By default, 
100                 <command>smbd</command> will append entries to the log 
101                 files.</para></listitem>
102                 </varlistentry>
103                 
104                 <varlistentry>
105                 <term>-h</term>
106                 <listitem><para>Prints the help information (usage) 
107                 for <command>nmbd</command>.</para></listitem>
108                 </varlistentry>
109                 
110                 <varlistentry>
111                 <term>-H &lt;filename&gt;</term>
112                 <listitem><para>NetBIOS lmhosts file.  The lmhosts 
113                 file is a list of NetBIOS names to IP addresses that 
114                 is loaded by the nmbd server and used via the name 
115                 resolution mechanism <ulink url="smb.conf.5.html#nameresolveorder">
116                 name resolve order</ulink> described in <ulink 
117                 url="smb.conf.5.html"> <filename>smb.conf(5)</filename></ulink>
118                 to resolve any NetBIOS name queries needed by the server. Note 
119                 that the contents of this file are <emphasis>NOT</emphasis> 
120                 used by <command>nmbd</command> to answer any name queries. 
121                 Adding a line to this file affects name NetBIOS resolution 
122                 from this host <emphasis>ONLY</emphasis>.</para>
123
124                 <para>The default path to this file is compiled into 
125                 Samba as part of the build process. Common defaults 
126                 are <filename>/usr/local/samba/lib/lmhosts</filename>,
127                 <filename>/usr/samba/lib/lmhosts</filename> or
128                 <filename>/etc/lmhosts</filename>. See the <ulink url="lmhosts.5.html">
129                 <filename>lmhosts(5)</filename></ulink> man page for details on the 
130                 contents of this file.</para></listitem>
131                 </varlistentry>
132
133                 <varlistentry>
134                 <term>-V</term>
135                 <listitem><para>Prints the version number for 
136                 <command>nmbd</command>.</para></listitem>
137                 </varlistentry>
138                 
139                 <varlistentry>
140                 <term>-d &lt;debug level&gt;</term>
141                 <listitem><para>debuglevel is an integer 
142                 from 0 to 10.  The default value if this parameter is 
143                 not specified is zero.</para>
144                 
145                 <para>The higher this value, the more detail will 
146                 be logged to the log files about the activities of the 
147                 server. At level 0, only critical errors and serious 
148                 warnings will be logged. Level 1 is a reasonable level for
149                 day to day running - it generates a small amount of 
150                 information about operations carried out.</para>
151
152                 <para>Levels above 1 will generate considerable amounts 
153                 of log data, and should only be used when investigating 
154                 a problem. Levels above 3 are designed for use only by developers 
155                 and generate HUGE amounts of log data, most of which is extremely 
156                 cryptic.</para>
157
158                 <para>Note that specifying this parameter here will override 
159                 the <ulink url="smb.conf.5.html#loglevel">log level</ulink> 
160                 parameter in the <ulink url="smb.conf.5.html"><filename>
161                 smb.conf</filename></ulink> file.</para></listitem>
162                 </varlistentry>
163                 
164                 <varlistentry>
165                 <term>-l &lt;log file&gt;</term>
166                 <listitem><para>The -l parameter specifies a path 
167                 and base filename into which operational data from 
168                 the running <command>nmbd</command> server will
169                 be logged.  The actual log file name is generated by 
170                 appending the extension ".nmb" to the specified base 
171                 name.  For example, if the name specified was "log" 
172                 then the file log.nmb would contain the debugging data.</para>
173
174                 <para>The default log file path is compiled into Samba as 
175                 part of the build process. Common defaults are <filename>
176                 /usr/local/samba/var/log.nmb</filename>, <filename>
177                 /usr/samba/var/log.nmb</filename> or
178                 <filename>/var/log/log.nmb</filename>.</para></listitem>
179                 </varlistentry>
180                 
181                 
182                 <varlistentry>
183                 <term>-n &lt;primary NetBIOS name&gt;</term>
184                 <listitem><para>This option allows you to override
185                 the NetBIOS name that Samba uses for itself. This is identical 
186                 to setting the <ulink url="smb.conf.5.html#netbiosname">
187                 NetBIOS name</ulink> parameter in the <ulink url="smb.conf.5.html">     
188                 <filename>smb.conf</filename></ulink> file.  However, a command
189                 line setting will take precedence over settings in 
190                 <filename>smb.conf</filename>.</para></listitem>
191                 </varlistentry>
192
193                 
194                 <varlistentry>
195                 <term>-p &lt;UDP port number&gt;</term>
196                 <listitem><para>UDP port number is a positive integer value.
197                 This option changes the default UDP port number (normally 137) 
198                 that <command>nmbd</command> responds to name queries on. Don't 
199                 use this option unless you are an expert, in which case you 
200                 won't need help!</para></listitem>
201                 </varlistentry>
202                 
203                 <varlistentry>
204                 <term>-s &lt;configuration file&gt;</term>
205                 <listitem><para>The default configuration file name 
206                 is set at build time, typically as <filename>
207                 /usr/local/samba/lib/smb.conf</filename>, but
208                 this may be changed when Samba is autoconfigured.</para>
209
210                 <para>The file specified contains the configuration details 
211                 required by the server. See <ulink url="smb.conf.5.html"> 
212                 <filename>smb.conf(5)</filename></ulink> for more information.
213                 </para></listitem>
214                 </varlistentry>
215         </variablelist>
216 </refsect1>
217
218 <refsect1>
219         <title>FILES</title>
220
221         <variablelist>
222                 <varlistentry>
223                 <term><filename>/etc/inetd.conf</filename></term>
224                 <listitem><para>If the server is to be run by the 
225                 <command>inetd</command> meta-daemon, this file 
226                 must contain suitable startup information for the 
227                 meta-daemon. See the section INSTALLATION below.
228                 </para></listitem>
229                 </varlistentry>
230                 
231                 <varlistentry>
232                 <term><filename>/etc/rc</filename></term>
233                 <listitem><para>or whatever initialization script your 
234                 system uses).</para>
235
236                 <para>If running the server as a daemon at startup, 
237                 this file will need to contain an appropriate startup 
238                 sequence for the server. See the section INSTALLATION 
239                 below.</para></listitem>
240                 </varlistentry>
241                 
242                 <varlistentry>
243                 <term><filename>/etc/services</filename></term>
244                 <listitem><para>If running the server via the 
245                 meta-daemon <command>inetd</command>, this file 
246                 must contain a mapping of service name (e.g., netbios-ssn) 
247                 to service port (e.g., 139) and protocol type (e.g., tcp). 
248                 See the section INSTALLATION below.</para></listitem>
249                 </varlistentry>
250                 
251                 <varlistentry>
252                 <term><filename>/usr/local/samba/lib/smb.conf</filename></term>
253                 <listitem><para>This is the default location of the 
254                 <ulink url="smb.conf.5.html"><filename>smb.conf</filename></ulink>
255                 server configuration file. Other common places that systems 
256                 install this file are <filename>/usr/samba/lib/smb.conf</filename> 
257                 and <filename>/etc/smb.conf</filename>.</para>
258                 
259                 <para>When run as a WINS server (see the 
260                 <ulink url="smb.conf.5.html#winssupport">wins support</ulink>
261                 parameter in the <ulink url="smb.conf.5.html"><filename>
262                 smb.conf(5)</filename></ulink> man page), <command>nmbd</command> 
263                 will store the WINS database in the file <filename>wins.dat</filename> 
264                 in the <filename>var/locks</filename> directory configured under 
265                 wherever Samba was configured to install itself.</para>
266
267                 <para>If <command>nmbd</command> is acting as a <emphasis>
268                 browse master</emphasis> (see the <ulink 
269                 url="smb.conf.5.html#localmaster">local master</ulink>
270                 parameter in the <ulink url="smb.conf.5.html"><filename>
271                 smb.conf(5)</filename></ulink> man page), <command>nmbd</command> 
272                 will store the browsing database in the file <filename>browse.dat
273                 </filename> in the <filename>var/locks</filename> directory
274                 configured under wherever Samba was configured to install itself.
275                 </para></listitem>
276                 </varlistentry>
277         </variablelist>
278 </refsect1>
279
280 <refsect1>
281         <title>SIGNALS</title>
282
283         <para>To shut down an <command>nmbd</command> process it is recommended 
284         that SIGKILL (-9) <emphasis>NOT</emphasis> be used, except as a last 
285         resort, as this may leave the name database in an inconsistent state. 
286         The correct way to terminate <command>nmbd</command> is to send it 
287         a SIGTERM (-15) signal and wait for it to die on its own.</para>
288
289         <para><command>nmbd</command> will accept SIGHUP, which will cause 
290         it to dump out it's namelists into the file <filename>namelist.debug
291         </filename> in the <filename>/usr/local/samba/var/locks</filename> 
292         directory (or the <filename>var/locks</filename> directory configured 
293         under wherever Samba was configured to install itself). This will also 
294         cause <command>nmbd</command> to dump out it's server database in
295         the <filename>log.nmb</filename> file. In addition, the debug log level 
296         of nmbd may be raised by sending it a SIGUSR1 (<command>kill -USR1
297         &lt;nmbd-pid&gt;</command>) and lowered by sending it a
298         SIGUSR2 (<command>kill -USR2 &lt;nmbd-pid&gt;</command>). This is to 
299         allow transient problems to be diagnosed, whilst still running at a 
300         normally low log level.</para>
301 </refsect1>
302
303
304 <refsect1>
305         <title>VERSION</title>
306
307         <para>This man page is correct for version 2.2 of 
308         the Samba suite.</para>
309 </refsect1>
310
311 <refsect1>
312         <title>SEE ALSO</title>
313         <para><command>inetd(8)</command>, <ulink
314         url="smbd.8.html"><command>smbd(8)</command></ulink>, 
315         <ulink url="smb.conf.5.html"><filename>smb.conf(5)</filename>
316         </ulink>, <ulink url="smbclient.1.html"><command>smbclient(1)
317         </command></ulink>, <ulink url="testparm.1.html"><command>
318         testparm(1)</command></ulink>, <ulink url="testprns.1.html">
319         <command>testprns(1)</command></ulink>, and the Internet RFC's
320         <filename>rfc1001.txt</filename>, <filename>rfc1002.txt</filename>. 
321         In addition the CIFS (formerly SMB) specification is available 
322         as a link from the Web page <ulink url="http://samba.org/cifs/"> 
323         http://samba.org/cifs/</ulink>.</para>
324 </refsect1>
325
326 <refsect1>
327         <title>AUTHOR</title>
328         
329         <para>The original Samba software and related utilities 
330         were created by Andrew Tridgell. Samba is now developed
331         by the Samba Team as an Open Source project similar 
332         to the way the Linux kernel is developed.</para>
333         
334         <para>The original Samba man pages were written by Karl Auer. 
335         The man page sources were converted to YODL format (another 
336         excellent piece of Open Source software, available at
337         <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
338         ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0 
339         release by Jeremy Allison.  The conversion to DocBook for 
340         Samba 2.2 was done by Gerald Carter</para>
341 </refsect1>
342
343 </refentry>