NMBLOOKUP(1)
π NAME π
okay so welcome to the manual page for nmblookup (section 1, the user commands one) π it's a NetBIOS over TCP/IP client used to lookup NetBIOS names. that's the whole vibe. let's go π¦
π SYNOPSIS π
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}
π DESCRIPTION π
so this little tool is part of the samba(7) suite, bestie. iconic family, we love her π
nmblookup is used to query NetBIOS names and map them to IP addresses in a network using NetBIOS over TCP/IP queries. the options let you aim those name queries at a particular IP broadcast area, or at one specific machine. and ngl, all queries are done over UDP β no cap, that's just how she rolls β¨
π OPTIONS π
-M,--master-browserβ searches for a master browser by looking up the NetBIOS name with a type of0x1d. if name is"-"then it does a lookup on the special name__MSBROWSE__. and listen β please note that in order to use the name"-", you need to make sure"-"isn't parsed as an argument, e.g. use :nmblookup -M -- -. π--recursionβ sets the recursion desired bit in the packet, so you get a recursive lookup. this is what you want when you're sending a name query to a machine running a WINS server and you wanna query the names in that WINS server. if this bit is unset, the normal (broadcast responding) NetBIOS processing code on a machine is used instead. seeRFC1001,RFC1002for details π-S,--statusβ once the name query has returned an IP address, then it does a node status query as well. a node status query returns the NetBIOS names registered by a host π«-r,--root-portβ tries to bind to UDP port137to send and receive UDP datagrams. the reason this option exists is a bug in Windows 95 where it ignores the source port of the requesting packet and only replies to UDP port137π unfortunately, on most UNIX systems root privilege is needed to bind to this port, and on top of that, if thenmbd(8)daemon is running on this machine it also binds to this port. so like. be aware π-A,--lookup-by-ipβ interprets name as an IP Address and does a node status query on this address π-B,--broadcast <broadcast address>β sends the query to the given broadcast address. without this option, the default behavior ofnmblookupis to send the query to the broadcast address of the network interfaces as either auto-detected or defined in the interfaces parameter of thesmb.conf(5)file β¨-U,--unicast <unicast address>β does a unicast query to the specified address or host unicast address. this option (along with the-Roption) is what you need to query a WINS server π«Ά-T,--translateβ 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
IP address .... NetBIOS name
pair that is the normal output πΈ
-f,--flagsβ shows 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π©nameβ this is the NetBIOS name being queried. depending on the previous options, this may be a NetBIOS name or an IP address. if it's a NetBIOS name, then the different name types may be specified by appending'#<type>'to the name. this name may also be'*', which will return all registered names within a broadcast area π-d,--debuglevel=levelβ level is an integer from0to10. the default value if this parameter is not specified is1for client applications.
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.
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 π΅βπ«
note that specifying this parameter here will override the log level parameter in the /etc/samba/smb.conf file.
--debug-stdoutβ this will redirect debug output toSTDOUT. by default all clients are logging toSTDERRπ€--configfile=<configuration file>β 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 things like options such as client smb encrypt. see/etc/samba/smb.conffor more information. the default configuration file name is determined at compile time π οΈ--option=<name>=<value>β set thesmb.conf(5)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 the whole--option=name=valueinto quotes βοΈ-l,--log-basename=logdirectoryβ base directory name for log/debug files. the extension".progname"will be appended (e.g.log.smbclient,log.smbd, etc...). the log file is never removed by the client π--leak-reportβ enable talloc leak reporting on exit π΅οΈ--leak-report-fullβ enable full talloc leak reporting on exit π΅οΈββοΈ-V,--versionβ prints the program version number π·οΈ-R,--name-resolve=NAME-RESOLVE-ORDERβ 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 move is to wrap the whole--name-resolve=NAME-RESOLVE-ORDERinto quotes π
the options are: "lmhosts", "host", "wins" and "bcast". they cause names to be resolved as follows:
lmhosts: lookup an IP address in the Samba lmhosts file. if the line in lmhosts has no name type attached to the NetBIOS name (see thelmhosts(5)for details) then any name type matches for lookup.host: do a standard host name to IP address resolution, using the system/etc/hosts,NIS, orDNSlookups. this method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the/etc/nsswitch.conffile). note that this method is only used if the NetBIOS name type being queried is the0x20(server) name type, otherwise it is ignored.wins: query a name with the IP address listed in the wins server parameter. if no WINS server has been specified this method will be ignored.bcast: do a broadcast on each of the known local interfaces listed in the interfaces parameter. this is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet π¬
if this parameter is not set, then the name resolve order defined in the /etc/samba/smb.conf file parameter (name resolve order) will be used.
the default order is lmhosts, host, wins, bcast. without this parameter or any entry in the name resolve order parameter of the /etc/samba/smb.conf file, the name resolution methods will be attempted in this order β¨
-O,--socket-options=SOCKETOPTIONSβ TCP socket options to set on the client socket. see the socket options parameter in the/etc/samba/smb.confmanual page for the list of valid options π§-m,--max-protocol=MAXPROTOCOLβ the value of the parameter (a string) is the highest protocol level that will be supported by the client.
note that specifying this parameter here will override the client max protocol parameter in the /etc/samba/smb.conf file.
-n,--netbiosname=NETBIOSNAMEβ this option allows you to override the NetBIOS name that Samba uses for itself. this is identical to setting the netbios name parameter in the/etc/samba/smb.conffile. however, a command line setting will take precedence over settings in/etc/samba/smb.confπ--netbios-scope=SCOPEβ this specifies a NetBIOS scope thatnmblookupwill use to communicate with when generating NetBIOS names. for details on the use of NetBIOS scopes, seerfc1001.txtandrfc1002.txt. NetBIOS scopes are very rarely used, so only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with π§βπ»-W,--workgroup=WORKGROUPβ set the SMB domain of the username. this overrides the default domain which is the domain defined insmb.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).
note that specifying this parameter here will override the workgroup parameter in the /etc/samba/smb.conf file.
-r,--realm=REALMβ set the realm for the domain.
note that specifying this parameter here will override the realm parameter in the /etc/samba/smb.conf file.
-?,--helpβ print a summary of command line options π--usageβ display brief usage message π
π EXAMPLES π
ok so nmblookup can be used to query a WINS server (in the same way nslookup is used to query DNS servers). to query a WINS server, nmblookup must be called like this:
nmblookup -U server -R 'name'
for example, running :
nmblookup -U samba.org -R 'IRIX#1B'
would query the WINS server samba.org for the domain master browser (1B name type) for the IRIX workgroup π
β VERSION β
this man page is part of version 4.24.7 of the Samba suite π
π₯ SEE ALSO π₯
nmbd(8), samba(7), and smb.conf(5) π«Ά
π AUTHOR π
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 π
and that's the whole page, bestie!! this was Samba 4.24.7, dated 09/09/2026 β go forth and look up those NetBIOS names, you absolute icon π
β¨
π¦ where this page comes from
- fedora 44: samba-client 2:4.24.7-1.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms