Added docs for new signal handling functions.
[samba.git] / docs / manpages / nmbd.8
1 .TH NMBD 8 "16 Dec 1997" "nmbd 1.9.18alpha13"
2 .SH NAME
3 nmbd \- provide netbios nameserver support to clients
4 .SH SYNOPSIS
5 .B nmbd
6 [
7 .B \-D
8 ] [
9 .B \-H
10 .I netbios hosts file
11 ] [
12 .B \-d
13 .I debuglevel
14 ] [
15 .B \-l
16 .I log basename
17 ] [
18 .B \-n
19 .I netbios name
20 ] [
21 .B \-p
22 .I port number
23 ] [
24 .B \-s
25 .I configuration file
26 ]
27 .SH DESCRIPTION
28 This program is part of the Samba suite.
29
30 .B nmbd
31 is a server that understands and can reply to netbios
32 name service requests, like those produced by LanManager
33 clients. It also controls browsing.
34
35 LanManager clients, when they start up, may wish to locate a LanManager server.
36 That is, they wish to know what IP number a specified host is using.
37
38 This program simply listens for such requests, and if its own name is specified
39 it will respond with the IP number of the host it is running on.
40 Its "own name" is by default the name of the host it is running on,
41 but this can be overriden with the
42 .B \-n
43 option (see "OPTIONS" below).
44
45 .B nmbd 
46 can also be used as a WINS (Windows Internet Name Server) server. 
47 What this basically means is that it will respond to all name requests that 
48 it receives that are not broadcasts, as long as it can resolve the name.
49 Resolvable names include all names in the netbios hosts file (if any, see 
50 .B \-H
51 below), its own name, and any other names that it may have learned about
52 from other browsers on the network.
53 A change to previous versions is that nmbd will now no longer
54 do this automatically by default.
55 .SH OPTIONS
56 .B \-B
57
58 .RS 3
59 This option is obsolete. Please use the "interfaces" option in smb.conf instead.
60 .RE
61
62 .B \-I
63
64 .RS 3
65 This option is obsolete. Please use the "interfaces" option in smb.conf instead.
66 .RE
67
68 .B \-D
69
70 .RS 3
71 If specified, this parameter causes the server to operate as a daemon. That is,
72 it detaches itself and runs in the background, fielding requests on the 
73 appropriate port.
74
75 By default, the server will NOT operate as a daemon.
76 .RE
77
78 .B \-C comment string
79
80 .RS 3
81 This option is obsolete. Please use the "server string" option in smb.conf 
82 instead.
83 .RE
84
85 .B \-G
86
87 .RS 3
88 This option is obsolete. Please use the "workgroup" option in smb.conf instead.
89 .RE
90
91 .B \-H
92 .I netbios hosts file
93
94 .RS 3
95 It may be useful in some situations to be able to specify a list of
96 netbios names for which the server should send a reply if queried.  
97 This option allows you to specify a file containing such a list. 
98 The syntax of the hosts file is similar to the standard /etc/hosts file
99 format, but has some extensions.
100
101 The file contains three columns. Lines beginning with a # are ignored
102 as comments. The first column is an IP address, or a hostname. If it
103 is a hostname then it is interpreted as the IP address returned by
104 gethostbyname() when read. An IP address of 0.0.0.0 will be
105 interpreted as the server's own IP address.
106
107 The second column is a netbios name. This is the name that the server
108 will respond to. It must be less than 20 characters long.
109
110 The third column is optional, and is intended for flags. Currently the
111 only flag supported is M, which means that this name is the default 
112 netbios name for this machine. This has the same effect as specifying the
113 .B \-n
114 option to
115 .BR nmbd .
116
117 NOTE: The G and S flags are now obsolete and are replaced by the
118 "interfaces" and "remote announce" options in smb.conf.
119
120 The default hosts file name is set at compile time, typically as
121 .I /etc/lmhosts,
122 but this may be changed in the Samba Makefile.
123
124 After startup the server waits for queries, and will answer queries for
125 any name known to it. This includes all names in the netbios hosts file, 
126 its own name, and any other names it may have learned about from other 
127 browsers on the network.
128
129 The primary intention of the
130 .B \-H
131 option is to allow a mapping from netbios names to internet domain names.
132
133 .B Example:
134
135         # This is a sample netbios hosts file
136
137         # DO NOT USE THIS FILE AS-IS
138         # YOU MAY INCONVENIENCE THE OWNERS OF THESE IPs
139         # if you want to include a name with a space in it then 
140         # use double quotes.
141
142         # next add a netbios alias for a faraway host
143         arvidsjaur.anu.edu.au ARVIDSJAUR
144
145         # finally put in an IP for a hard to find host
146         130.45.3.213 FREDDY
147
148 .RE
149 .B \-N
150
151 .RS 3
152 This option is obsolete. Please use the "interfaces" option in smb.conf instead.
153 .RE
154
155 .B \-d
156 .I debuglevel
157
158 .RS 3
159 This option sets the debug level. See
160 .BR smb.conf (5).
161 .RE
162
163 .B \-l
164 .I log file
165
166 .RS 3
167 The
168 .I log file
169 parameter specifies a path and base filename into which operational data 
170 from the running 
171 .B nmbd
172 server will be logged.
173 The actual log file name is generated by appending the extension ".nmb" to 
174 the specified base name.
175 For example, if the name specified was "log" then the file log.nmb would
176 contain the debugging data.
177
178 The default log file is specified at compile time, typically as
179 .I /var/log/log.nmb.
180 .RE
181
182 .B \-n
183 .I netbios name
184
185 .RS 3
186 This option allows you to override the Netbios name that Samba uses for itself. 
187 .RE
188
189 .B \-a
190
191 .RS 3
192 If this parameter is specified, the log files will be appended to with each 
193 new connection. By default, the log files will be overwritten.
194 .RE
195
196 .B \-p
197 .I port number
198 .RS 3
199
200 port number is a positive integer value.
201
202 Don't use this option unless you are an expert, in which case you
203 won't need help!
204 .RE
205
206 .B \-s
207 .I configuration file
208
209 .RS 3
210 The default configuration file name is set at compile time, typically as
211 .I /etc/smb.conf,
212 but this may be changed in the Samba Makefile.
213
214 The file specified contains the configuration details required by the server.
215 See
216 .BR smb.conf (5)
217 for more information.
218 .RE
219 .SH SIGNALS
220
221 In version 1.9.18 and above, nmbd will accept SIGHUP, which will cause it to dump out
222 it's namelists into the file namelist.debug in the SAMBA/var/locks directory. This
223 will also cause nmbd to dump out it's server database in the log.nmb file.
224 Also new in version 1.9.18 and above is the ability to raise the debug log
225 level of nmbd by sending it a SIGUSR1 (kill -USR1 <nmbd-pid>) and to lower
226 the nmbd log level by sending it a SIGUSR2 (kill -USR2 <nmbd-pid>). This
227 is to allow transient problems to be diagnosed, whilst still running at
228 a normally low log level.
229
230 .SH VERSION
231
232 This man page is (mostly) correct for version 1.9.16 of the Samba
233 suite, plus some of the recent patches to it. These notes will
234 necessarily lag behind development of the software, so it is possible
235 that your version of the server has extensions or parameter semantics
236 that differ from or are not covered by this man page. Please notify
237 these to the address below for rectification.
238 .SH SEE ALSO
239 .BR inetd (8),
240 .BR smbd (8), 
241 .BR smb.conf (5),
242 .BR smbclient (1),
243 .BR testparm (1), 
244 .BR testprns (1)
245 .SH CREDITS
246 The original Samba software and related utilities were created by 
247 Andrew Tridgell (samba-bugs@samba.anu.edu.au). Andrew is also the Keeper
248 of the Source for this project.
249