librpc: Fix error path cleanups in start_rpc_host_send()
[Samba.git] / docs-xml / manpages / nmbd.8.xml
blob5400a671357ddd444c076562539f096d81fc6b01
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">
3 <refentry id="nmbd.8">
5 <refmeta>
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>
11 </refmeta>
14 <refnamediv>
15         <refname>nmbd</refname>
16         <refpurpose>NetBIOS name server to provide NetBIOS 
17         over IP naming services to clients</refpurpose>
18 </refnamediv>
20 <refsynopsisdiv>
21         <cmdsynopsis>
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 &lt;port number(s)&gt;</arg>
29                 <arg choice="opt">-P &lt;profiling level&gt;</arg>
30                 <arg choice="opt">-d &lt;debug level&gt;</arg>
31                 <arg choice="opt">--debug-stdout</arg>
32                 <arg choice="opt">--configfile=&lt;configuration file&gt;</arg>
33                 <arg choice="opt">--option=&lt;name&gt;=&lt;value&gt;</arg>
34                 <arg choice="opt">-l|--log-basename &lt;log directory&gt;</arg>
35                 <arg choice="opt">--leak-report</arg>
36                 <arg choice="opt">--leak-report-full</arg>
37                 <arg choice="opt">-V|--version</arg>
38         </cmdsynopsis>
39 </refsynopsisdiv>
41 <refsect1>
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 
78         server.</para>
79 </refsect1>
81 <refsect1>
82         <title>OPTIONS</title>
84         <variablelist>
85                 <varlistentry>
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.
94                 </para></listitem>
95                 </varlistentry>
97                 <varlistentry>
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.
109                 </para></listitem>
110                 </varlistentry>
112                 <varlistentry>
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>
121                 </varlistentry>
123                 <varlistentry>
124                 <term>-H|--hosts &lt;filename&gt;</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>
142                 </varlistentry>
144                 <varlistentry>
145                 <term>-p|--port &lt;UDP port number&gt;</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>
151                 </varlistentry>
153                 <varlistentry>
154                 <term>--no-process-group</term>
155                 <listitem><para>Do not create a new process group for nmbd.
156                 </para></listitem>
157                 </varlistentry>
159                 &cmdline.common.samba.server;
160                 &popt.autohelp;
161         </variablelist>
162 </refsect1>
164 <refsect1>
165         <title>FILES</title>
167         <variablelist>
168                 <varlistentry>
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
173                 meta-daemon. 
174                 </para></listitem>
175                 </varlistentry>
177                 <varlistentry>
178                 <term><filename>/etc/rc</filename></term>
179                 <listitem><para>or whatever initialization script your
180                 system uses).</para>
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>
185                 </varlistentry>
187                 <varlistentry>
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).
193                 </para></listitem>
194                 </varlistentry>
196                 <varlistentry>
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.
221                 </para></listitem>
222                 </varlistentry>
223         </variablelist>
224 </refsect1>
226 <refsect1>
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>
244         <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.
249         </para>
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>
257 </refsect1>
260 <refsect1>
261         <title>VERSION</title>
263         <para>This man page is part of version &doc.version; of
264         the Samba suite.</para>
265 </refsect1>
267 <refsect1>
268         <title>SEE ALSO</title>
269         <para>
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>
280 </refsect1>
282 <refsect1>
283         <title>AUTHOR</title>
284         
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>
289 </refsect1>
291 </refentry>