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 of 0x1d. 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. see RFC1001, RFC1002 for 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 port 137 to 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 port 137 😭 unfortunately, on most UNIX systems root privilege is needed to bind to this port, and on top of that, if the nmbd(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 of nmblookup is to send the query to the broadcast address of the network interfaces as either auto-detected or defined in the interfaces parameter of the smb.conf(5) file ✨
  • -U, --unicast <unicast address> β€” does a unicast query to the specified address or host unicast address. this option (along with the -R option) 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 from 0 to 10. the default value if this parameter is not specified is 1 for 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 to STDOUT. by default all clients are logging to STDERR πŸ“€
  • --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.conf for more information. the default configuration file name is determined at compile time πŸ› οΈ
  • --option=<name>=<value> β€” set the smb.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=value into 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-ORDER into 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 the lmhosts(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, or DNS lookups. this method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the /etc/nsswitch.conf 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.
  • 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.conf manual 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.conf file. however, a command line setting will take precedence over settings in /etc/samba/smb.conf πŸ‘‘
  • --netbios-scope=SCOPE β€” this specifies a NetBIOS scope that nmblookup 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 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 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).

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