Debian Codegraph @

upstream/debian-unstable/man1/nmblookup.1

raw
1 '\" t
2 .\" Title: nmblookup
3 .\" Author: [see the "AUTHOR" section]
4 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
5 .\" Date: 05/26/2026
6 .\" Manual: User Commands
7 .\" Source: Samba 4.24.3-Debian-4.24.3+dfsg-1
8 .\" Language: English
9 .\"
10 .TH "NMBLOOKUP" "1" "05/26/2026" "Samba 4\&.24\&.3\-Debian\-4\&.24\&.3+dfs" "User Commands"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 nmblookup \- NetBIOS over TCP/IP client used to lookup NetBIOS names
32 .SH "SYNOPSIS"
33 .HP \w'\ 'u
34 nmblookup [\-M|\-\-master\-browser] [\-\-recursion] [\-S|\-\-status] [\-r|\-\-root\-port] [\-A|\-\-lookup\-by\-ip] [\-B|\-\-broadcast=BROADCAST\-ADDRESS] [\-U|\-\-unicast=UNICAST\-ADDRESS] [\-T|\-\-translate] [\-f|\-\-flags] [\-?|\-\-help] [\-\-usage] [\-d|\-\-debuglevel=DEBUGLEVEL] [\-\-debug\-stdout] [\-\-configfile=CONFIGFILE] [\-\-option=name=value] [\-l|\-\-log\-basename=LOGFILEBASE] [\-\-leak\-report] [\-\-leak\-report\-full] [\-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER] [\-O|\-\-socket\-options=SOCKETOPTIONS] [\-m|\-\-max\-protocol=MAXPROTOCOL] [\-n|\-\-netbiosname=NETBIOSNAME] [\-\-netbios\-scope=SCOPE] [\-W|\-\-workgroup=WORKGROUP] [\-\-realm=REALM] {name}
35 .SH "DESCRIPTION"
36 .PP
37 This tool is part of the
38 \fBsamba\fR(7)
39 suite\&.
40 .PP
41 nmblookup
42 is used to query NetBIOS names and map them to IP addresses in a network using NetBIOS over TCP/IP queries\&. The options allow the name queries to be directed at a particular IP broadcast area or to a particular machine\&. All queries are done over UDP\&.
43 .SH "OPTIONS"
44 .PP
45 \-M|\-\-master\-browser
46 .RS 4
47 Searches for a master browser by looking up the NetBIOS
48 \fIname\fR
49 with a type of
50 \fB0x1d\fR\&. If
51 \fI name\fR
52 is "\-" then it does a lookup on the special name
53 \fB__MSBROWSE__\fR\&. Please note that in order to use the name "\-", you need to make sure "\-" isn\*(Aqt parsed as an argument, e\&.g\&. use :
54 \fBnmblookup \-M \-\- \-\fR\&.
55 .RE
56 .PP
57 \-\-recursion
58 .RS 4
59 Set the recursion desired bit in the packet to do a recursive lookup\&. This is used when sending a name query to a machine running a WINS server and the user wishes to query the names in the WINS server\&. If this bit is unset the normal (broadcast responding) NetBIOS processing code on a machine is used instead\&. See RFC1001, RFC1002 for details\&.
60 .RE
61 .PP
62 \-S|\-\-status
63 .RS 4
64 Once the name query has returned an IP address then do a node status query as well\&. A node status query returns the NetBIOS names registered by a host\&.
65 .RE
66 .PP
67 \-r|\-\-root\-port
68 .RS 4
69 Try and bind to UDP port 137 to send and receive UDP datagrams\&. The reason for this option is a bug in Windows 95 where it ignores the source port of the requesting packet and only replies to UDP port 137\&. Unfortunately, on most UNIX systems root privilege is needed to bind to this port, and in addition, if the
70 \fBnmbd\fR(8)
71 daemon is running on this machine it also binds to this port\&.
72 .RE
73 .PP
74 \-A|\-\-lookup\-by\-ip
75 .RS 4
76 Interpret
77 \fIname\fR
78 as an IP Address and do a node status query on this address\&.
79 .RE
80 .PP
81 \-B|\-\-broadcast <broadcast address>
82 .RS 4
83 Send the query to the given broadcast address\&. Without this option the default behavior of nmblookup is to send the query to the broadcast address of the network interfaces as either auto\-detected or defined in the
84 \fIinterfaces\fR
85 parameter of the
86 \fBsmb.conf\fR(5)
87 file\&.
88 .RE
89 .PP
90 \-U|\-\-unicast <unicast address>
91 .RS 4
92 Do a unicast query to the specified address or host
93 \fIunicast address\fR\&. This option (along with the
94 \fI\-R\fR
95 option) is needed to query a WINS server\&.
96 .RE
97 .PP
98 \-T|\-\-translate
99 .RS 4
100 This causes any IP addresses found in the lookup to be looked up via a reverse DNS lookup into a DNS name, and printed out before each
101 .sp
102 \fIIP address \&.\&.\&.\&. NetBIOS name\fR
103 .sp
104 pair that is the normal output\&.
105 .RE
106 .PP
107 \-f|\-\-flags
108 .RS 4
109 Show which flags apply to the name that has been looked up\&. Possible answers are zero or more of: Response, Authoritative, Truncated, Recursion_Desired, Recursion_Available, Broadcast\&.
110 .RE
111 .PP
112 name
113 .RS 4
114 This is the NetBIOS name being queried\&. Depending upon the previous options this may be a NetBIOS name or IP address\&. If a NetBIOS name then the different name types may be specified by appending \*(Aq#<type>\*(Aq to the name\&. This name may also be \*(Aq*\*(Aq, which will return all registered names within a broadcast area\&.
115 .RE
116 .PP
117 \-d|\-\-debuglevel=level
118 .RS 4
119 \fIlevel\fR
120 is an integer from 0 to 10\&. The default value if this parameter is not specified is 1 for client applications\&.
121 .sp
122 The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
123 .sp
124 Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
125 .sp
126 Note that specifying this parameter here will override the
127 \m[blue]\fBlog level\fR\m[]
128 parameter in the
129 /etc/samba/smb\&.conf
130 file\&.
131 .RE
132 .PP
133 \-\-debug\-stdout
134 .RS 4
135 This will redirect debug output to STDOUT\&. By default all clients are logging to STDERR\&.
136 .RE
137 .PP
138 \-\-configfile=<configuration file>
139 .RS 4
140 The file specified contains the configuration details required by the client\&. The information in this file can be general for client and server or only provide client specific like options such as
141 \m[blue]\fBclient smb encrypt\fR\m[]\&. See
142 /etc/samba/smb\&.conf
143 for more information\&. The default configuration file name is determined at compile time\&.
144 .RE
145 .PP
146 \-\-option=<name>=<value>
147 .RS 4
148 Set the
149 \fBsmb.conf\fR(5)
150 option "<name>" to value "<value>" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&. If a name or a value includes a space, wrap whole \-\-option=name=value into quotes\&.
151 .RE
152 .PP
153 \-l|\-\-log\-basename=logdirectory
154 .RS 4
155 Base directory name for log/debug files\&. The extension
156 \fB"\&.progname"\fR
157 will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
158 .RE
159 .PP
160 \-\-leak\-report
161 .RS 4
162 Enable talloc leak reporting on exit\&.
163 .RE
164 .PP
165 \-\-leak\-report\-full
166 .RS 4
167 Enable full talloc leak reporting on exit\&.
168 .RE
169 .PP
170 \-V|\-\-version
171 .RS 4
172 Prints the program version number\&.
173 .RE
174 .PP
175 \-R|\-\-name\-resolve=NAME\-RESOLVE\-ORDER
176 .RS 4
177 This option is used to determine what naming services and in what order to resolve host names to IP addresses\&. The option takes a space\-separated string of different name resolution options\&. The best is to wrap the whole \-\-name\-resolve=NAME\-RESOLVE\-ORDER into quotes\&.
178 .sp
179 The options are: "lmhosts", "host", "wins" and "bcast"\&. They cause names to be resolved as follows:
180 .RS
181 .sp
182 .RS 4
183 .ie n \{\
184 \h'-04'\(bu\h'+03'\c
185 .\}
186 .el \{\
187 .sp -1
188 .IP \(bu 2.3
189 .\}
190 \fBlmhosts\fR: Lookup an IP address in the Samba lmhosts file\&. If the line in lmhosts has no name type attached to the NetBIOS name (see the
191 \fBlmhosts\fR(5)
192 for details) then any name type matches for lookup\&.
193 .RE
194 .sp
195 .RS 4
196 .ie n \{\
197 \h'-04'\(bu\h'+03'\c
198 .\}
199 .el \{\
200 .sp -1
201 .IP \(bu 2.3
202 .\}
203 \fBhost\fR: Do a standard host name to IP address resolution, using the system
204 /etc/hosts, NIS, or DNS lookups\&. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the
205 /etc/nsswitch\&.conf
206 file)\&. Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored\&.
207 .RE
208 .sp
209 .RS 4
210 .ie n \{\
211 \h'-04'\(bu\h'+03'\c
212 .\}
213 .el \{\
214 .sp -1
215 .IP \(bu 2.3
216 .\}
217 \fBwins\fR: Query a name with the IP address listed in the
218 \fIwins server\fR
219 parameter\&. If no WINS server has been specified this method will be ignored\&.
220 .RE
221 .sp
222 .RS 4
223 .ie n \{\
224 \h'-04'\(bu\h'+03'\c
225 .\}
226 .el \{\
227 .sp -1
228 .IP \(bu 2.3
229 .\}
230 \fBbcast\fR: Do a broadcast on each of the known local interfaces listed in the
231 \fIinterfaces\fR
232 parameter\&. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet\&.
233 .RE
234 .sp
235 .RE
236 If this parameter is not set then the name resolve order defined in the
237 /etc/samba/smb\&.conf
238 file parameter (\m[blue]\fBname resolve order\fR\m[]) will be used\&.
239 .sp
240 The default order is lmhosts, host, wins, bcast\&. Without this parameter or any entry in the
241 \m[blue]\fBname resolve order\fR\m[]
242 parameter of the
243 /etc/samba/smb\&.conf
244 file, the name resolution methods will be attempted in this order\&.
245 .RE
246 .PP
247 \-O|\-\-socket\-options=SOCKETOPTIONS
248 .RS 4
249 TCP socket options to set on the client socket\&. See the socket options parameter in the
250 /etc/samba/smb\&.conf
251 manual page for the list of valid options\&.
252 .RE
253 .PP
254 \-m|\-\-max\-protocol=MAXPROTOCOL
255 .RS 4
256 The value of the parameter (a string) is the highest protocol level that will be supported by the client\&.
257 .sp
258 Note that specifying this parameter here will override the
259 \m[blue]\fBclient max protocol\fR\m[]
260 parameter in the
261 /etc/samba/smb\&.conf
262 file\&.
263 .RE
264 .PP
265 \-n|\-\-netbiosname=NETBIOSNAME
266 .RS 4
267 This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the
268 \m[blue]\fBnetbios name\fR\m[]
269 parameter in the
270 /etc/samba/smb\&.conf
271 file\&. However, a command line setting will take precedence over settings in
272 /etc/samba/smb\&.conf\&.
273 .RE
274 .PP
275 \-\-netbios\-scope=SCOPE
276 .RS 4
277 This specifies a NetBIOS scope that
278 nmblookup
279 will use to communicate with when generating NetBIOS names\&. For details on the use of NetBIOS scopes, see rfc1001\&.txt and rfc1002\&.txt\&. NetBIOS scopes are
280 \fIvery\fR
281 rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\&.
282 .RE
283 .PP
284 \-W|\-\-workgroup=WORKGROUP
285 .RS 4
286 Set the SMB domain of the username\&. This overrides the default domain which is the domain defined in smb\&.conf\&. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM)\&.
287 .sp
288 Note that specifying this parameter here will override the
289 \m[blue]\fBworkgroup\fR\m[]
290 parameter in the
291 /etc/samba/smb\&.conf
292 file\&.
293 .RE
294 .PP
295 \-r|\-\-realm=REALM
296 .RS 4
297 Set the realm for the domain\&.
298 .sp
299 Note that specifying this parameter here will override the
300 \m[blue]\fBrealm\fR\m[]
301 parameter in the
302 /etc/samba/smb\&.conf
303 file\&.
304 .RE
305 .PP
306 \-?|\-\-help
307 .RS 4
308 Print a summary of command line options\&.
309 .RE
310 .PP
311 \-\-usage
312 .RS 4
313 Display brief usage message\&.
314 .RE
315 .SH "EXAMPLES"
316 .PP
317 nmblookup
318 can be used to query a WINS server (in the same way
319 nslookup
320 is used to query DNS servers)\&. To query a WINS server,
321 nmblookup
322 must be called like this:
323 .PP
324 nmblookup \-U server \-R \*(Aqname\*(Aq
325 .PP
326 For example, running :
327 .PP
328 nmblookup \-U samba\&.org \-R \*(AqIRIX#1B\*(Aq
329 .PP
330 would query the WINS server samba\&.org for the domain master browser (1B name type) for the IRIX workgroup\&.
331 .SH "VERSION"
332 .PP
333 This man page is part of version 4\&.24\&.3\-Debian\-4\&.24\&.3+dfsg\-1 of the Samba suite\&.
334 .SH "SEE ALSO"
335 .PP
336 \fBnmbd\fR(8),
337 \fBsamba\fR(7), and
338 \fBsmb.conf\fR(5)\&.
339 .SH "AUTHOR"
340 .PP
341 The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.