1NMBLOOKUP(1) User Commands NMBLOOKUP(1)
2
3
4
6 nmblookup - NetBIOS over TCP/IP client used to lookup NetBIOS names
7
9 nmblookup [-M|--master-browser] [--recursion] [-S|--status]
10 [-r|--root-port] [-A|--lookup-by-ip]
11 [-B|--broadcast=BROADCAST-ADDRESS] [-U|--unicast=UNICAST-ADDRESS]
12 [-T|--translate] [-f|--flags] [-?|--help] [--usage]
13 [-d|--debuglevel=DEBUGLEVEL] [--debug-stdout]
14 [--configfile=CONFIGFILE] [--option=name=value]
15 [-l|--log-basename=LOGFILEBASE] [--leak-report] [--leak-report-full]
16 [-R|--name-resolve=NAME-RESOLVE-ORDER]
17 [-O|--socket-options=SOCKETOPTIONS] [-m|--max-protocol=MAXPROTOCOL]
18 [-n|--netbiosname=NETBIOSNAME] [--netbios-scope=SCOPE]
19 [-W|--workgroup=WORKGROUP] [--realm=REALM] {name}
20
22 This tool is part of the samba(7) suite.
23
24 nmblookup is used to query NetBIOS names and map them to IP addresses
25 in a network using NetBIOS over TCP/IP queries. The options allow the
26 name queries to be directed at a particular IP broadcast area or to a
27 particular machine. All queries are done over UDP.
28
30 -M|--master-browser
31 Searches for a master browser by looking up the NetBIOS name with a
32 type of 0x1d. If
33 name is "-" then it does a lookup on the special name
34 __MSBROWSE__. Please note that in order to use the name "-", you
35 need to make sure "-" isn't parsed as an argument, e.g. use :
36 nmblookup -M -- -.
37
38 --recursion
39 Set the recursion desired bit in the packet to do a recursive
40 lookup. This is used when sending a name query to a machine running
41 a WINS server and the user wishes to query the names in the WINS
42 server. If this bit is unset the normal (broadcast responding)
43 NetBIOS processing code on a machine is used instead. See RFC1001,
44 RFC1002 for details.
45
46 -S|--status
47 Once the name query has returned an IP address then do a node
48 status query as well. A node status query returns the NetBIOS names
49 registered by a host.
50
51 -r|--root-port
52 Try and bind to UDP port 137 to send and receive UDP datagrams. The
53 reason for this option is a bug in Windows 95 where it ignores the
54 source port of the requesting packet and only replies to UDP port
55 137. Unfortunately, on most UNIX systems root privilege is needed
56 to bind to this port, and in addition, if the nmbd(8) daemon is
57 running on this machine it also binds to this port.
58
59 -A|--lookup-by-ip
60 Interpret name as an IP Address and do a node status query on this
61 address.
62
63 -B|--broadcast <broadcast address>
64 Send the query to the given broadcast address. Without this option
65 the default behavior of nmblookup is to send the query to the
66 broadcast address of the network interfaces as either auto-detected
67 or defined in the interfaces parameter of the smb.conf(5) file.
68
69 -U|--unicast <unicast address>
70 Do a unicast query to the specified address or host unicast
71 address. This option (along with the -R option) is needed to query
72 a WINS server.
73
74 -T|--translate
75 This causes any IP addresses found in the lookup to be looked up
76 via a reverse DNS lookup into a DNS name, and printed out before
77 each
78
79 IP address .... NetBIOS name
80
81 pair that is the normal output.
82
83 -f|--flags
84 Show which flags apply to the name that has been looked up.
85 Possible answers are zero or more of: Response, Authoritative,
86 Truncated, Recursion_Desired, Recursion_Available, Broadcast.
87
88 name
89 This is the NetBIOS name being queried. Depending upon the previous
90 options this may be a NetBIOS name or IP address. If a NetBIOS name
91 then the different name types may be specified by appending
92 '#<type>' to the name. This name may also be '*', which will return
93 all registered names within a broadcast area.
94
95 -d|--debuglevel=DEBUGLEVEL
96 level is an integer from 0 to 10. The default value if this
97 parameter is not specified is 1 for client applications.
98
99 The higher this value, the more detail will be logged to the log
100 files about the activities of the server. At level 0, only critical
101 errors and serious warnings will be logged. Level 1 is a reasonable
102 level for day-to-day running - it generates a small amount of
103 information about operations carried out.
104
105 Levels above 1 will generate considerable amounts of log data, and
106 should only be used when investigating a problem. Levels above 3
107 are designed for use only by developers and generate HUGE amounts
108 of log data, most of which is extremely cryptic.
109
110 Note that specifying this parameter here will override the log
111 level parameter in the /etc/samba/smb.conf file.
112
113 --debug-stdout
114 This will redirect debug output to STDOUT. By default all clients
115 are logging to STDERR.
116
117 --configfile=<configuration file>
118 The file specified contains the configuration details required by
119 the client. The information in this file can be general for client
120 and server or only provide client specific like options such as
121 client smb encrypt. See /etc/samba/smb.conf for more information.
122 The default configuration file name is determined at compile time.
123
124 --option=<name>=<value>
125 Set the smb.conf(5) option "<name>" to value "<value>" from the
126 command line. This overrides compiled-in defaults and options read
127 from the configuration file. If a name or a value includes a space,
128 wrap whole --option=name=value into quotes.
129
130 -l|--log-basename=logdirectory
131 Base directory name for log/debug files. The extension ".progname"
132 will be appended (e.g. log.smbclient, log.smbd, etc...). The log
133 file is never removed by the client.
134
135 --leak-report
136 Enable talloc leak reporting on exit.
137
138 --leak-report-full
139 Enable full talloc leak reporting on exit.
140
141 -V|--version
142 Prints the program version number.
143
144 -R|--name-resolve=NAME-RESOLVE-ORDER
145 This option is used to determine what naming services and in what
146 order to resolve host names to IP addresses. The option takes a
147 space-separated string of different name resolution options. The
148 best is to wrap the whole --name-resolve=NAME-RESOLVE-ORDER into
149 quotes.
150
151 The options are: "lmhosts", "host", "wins" and "bcast". They cause
152 names to be resolved as follows:
153
154 • lmhosts: Lookup an IP address in the Samba lmhosts file.
155 If the line in lmhosts has no name type attached to the
156 NetBIOS name (see the lmhosts(5) for details) then any
157 name type matches for lookup.
158
159 • host: Do a standard host name to IP address resolution,
160 using the system /etc/hosts, NIS, or DNS lookups. This
161 method of name resolution is operating system dependent,
162 for instance on IRIX or Solaris this may be controlled
163 by the /etc/nsswitch.conf file). Note that this method
164 is only used if the NetBIOS name type being queried is
165 the 0x20 (server) name type, otherwise it is ignored.
166
167 • wins: Query a name with the IP address listed in the
168 wins server parameter. If no WINS server has been
169 specified this method will be ignored.
170
171 • bcast: Do a broadcast on each of the known local
172 interfaces listed in the interfaces parameter. This is
173 the least reliable of the name resolution methods as it
174 depends on the target host being on a locally connected
175 subnet.
176
177 If this parameter is not set then the name resolve order defined in
178 the /etc/samba/smb.conf file parameter (name resolve order) will be
179 used.
180
181 The default order is lmhosts, host, wins, bcast. Without this
182 parameter or any entry in the name resolve order parameter of the
183 /etc/samba/smb.conf file, the name resolution methods will be
184 attempted in this order.
185
186 -O|--socket-options=SOCKETOPTIONS
187 TCP socket options to set on the client socket. See the socket
188 options parameter in the /etc/samba/smb.conf manual page for the
189 list of valid options.
190
191 -m|--max-protocol=MAXPROTOCOL
192 The value of the parameter (a string) is the highest protocol level
193 that will be supported by the client.
194
195 Note that specifying this parameter here will override the client
196 max protocol parameter in the /etc/samba/smb.conf file.
197
198 -n|--netbiosname=NETBIOSNAME
199 This option allows you to override the NetBIOS name that Samba uses
200 for itself. This is identical to setting the netbios name parameter
201 in the /etc/samba/smb.conf file. However, a command line setting
202 will take precedence over settings in /etc/samba/smb.conf.
203
204 --netbios-scope=SCOPE
205 This specifies a NetBIOS scope that nmblookup will use to
206 communicate with when generating NetBIOS names. For details on the
207 use of NetBIOS scopes, see rfc1001.txt and rfc1002.txt. NetBIOS
208 scopes are very rarely used, only set this parameter if you are the
209 system administrator in charge of all the NetBIOS systems you
210 communicate with.
211
212 -W|--workgroup=WORKGROUP
213 Set the SMB domain of the username. This overrides the default
214 domain which is the domain defined in smb.conf. If the domain
215 specified is the same as the servers NetBIOS name, it causes the
216 client to log on using the servers local SAM (as opposed to the
217 Domain SAM).
218
219 Note that specifying this parameter here will override the
220 workgroup parameter in the /etc/samba/smb.conf file.
221
222 -r|--realm=REALM
223 Set the realm for the domain.
224
225 Note that specifying this parameter here will override the realm
226 parameter in the /etc/samba/smb.conf file.
227
228 -?|--help
229 Print a summary of command line options.
230
231 --usage
232 Display brief usage message.
233
235 nmblookup can be used to query a WINS server (in the same way nslookup
236 is used to query DNS servers). To query a WINS server, nmblookup must
237 be called like this:
238
239 nmblookup -U server -R 'name'
240
241 For example, running :
242
243 nmblookup -U samba.org -R 'IRIX#1B'
244
245 would query the WINS server samba.org for the domain master browser (1B
246 name type) for the IRIX workgroup.
247
249 This man page is part of version 4.19.3 of the Samba suite.
250
252 nmbd(8), samba(7), and smb.conf(5).
253
255 The original Samba software and related utilities were created by
256 Andrew Tridgell. Samba is now developed by the Samba Team as an Open
257 Source project similar to the way the Linux kernel is developed.
258
259
260
261Samba 4.19.3 11/27/2023 NMBLOOKUP(1)