nmbd is a server that understands and can reply to netbios name service requests, like those produced by LanManager clients. It also controls browsing.
LanManager clients, when they start up, may wish to locate a LanManager server. That is, they wish to know what IP number a specified host is using.
This program simply listens for such requests, and if its own name is specified it will respond with the IP number of the host it is running on. Its "own name" is by default the name of the host it is running on, but this can be overriden with the -n option (see "OPTIONS" below).
nmbd can also be used as a WINS (Windows Internet Name Server) server. What this basically means is that it will respond to all name requests that it receives that are not broadcasts, as long as it can resolve the name. Resolvable names include all names in the netbios hosts file (if any, see -H below), its own name, and any other names that it may have learned about from other browsers on the network. A change to previous versions is that nmbd will now no longer do this automatically by default.
-I
-D
By default, the server will NOT operate as a daemon.
-C comment string
-G
-H netbios hosts file
The file contains three columns. Lines beginning with a # are ignored as comments. The first column is an IP address, or a hostname. If it is a hostname then it is interpreted as the IP address returned by gethostbyname() when read. An IP address of 0.0.0.0 will be interpreted as the server's own IP address.
The second column is a netbios name. This is the name that the server will respond to. It must be less than 20 characters long.
The third column is optional, and is intended for flags. Currently the only flag supported is M, which means that this name is the default netbios name for this machine. This has the same effect as specifying the -n option to nmbd.
NOTE: The G and S flags are now obsolete and are replaced by the "interfaces" and "remote announce" options in smb.conf.
The default hosts file name is set at compile time, typically as /etc/lmhosts, but this may be changed in the Samba Makefile.
After startup the server waits for queries, and will answer queries for any name known to it. This includes all names in the netbios hosts file, its own name, and any other names it may have learned about from other browsers on the network.
The primary intention of the -H option is to allow a mapping from netbios names to internet domain names.
Example:
# This is a sample netbios hosts file
# DO NOT USE THIS FILE AS-IS
# YOU MAY INCONVENIENCE THE OWNERS OF THESE IPs
# if you want to include a name with a space in it then
# use double quotes.
# next add a netbios alias for a faraway host
arvidsjaur.anu.edu.au ARVIDSJAUR
# finally put in an IP for a hard to find host
130.45.3.213 FREDDY
-d debuglevel
-l log file
The default log file is specified at compile time, typically as /var/log/log.nmb.
-n netbios name
-p port number
port number is a positive integer value.
Don't use this option unless you are an expert, in which case you won't need help!
-s configuration file
The file specified contains the configuration details required by the server. See smb.conf(5) for more information.
This man page is (mostly) correct for version 1.9.16 of the Samba suite, plus some of the recent patches to it. These notes will necessarily lag behind development of the software, so it is possible that your version of the server has extensions or parameter semantics that differ from or are not covered by this man page. Please notify these to the address below for rectification.