This will test the "advertising" system used for Windows name services and browsing. Advertising works by broadcasting one's presence or willingness to provide services. It is the part of browsing that uses an unreliable protocol (UDP), and works only on broadcast networks like Ethernets. The
nmblookup program broadcasts name queries for the hostname you provide, and returns its IP address and the name of the machine, much like
nslookup does with DNS. Here, the
-d
(debug- or log-level) option, and the
-B
(broadcast address) options direct queries to specific machines.
First, we check the server from itself. Run
nmblookup with a
-B
option of your server's name to tell it to send the query to the Samba server, and a parameter of
_ _SAMBA_ _
as the symbolic name to look up. You should get:
server%
nmblookup -B
server
_ _SAMBA_ _
Added interface ip=192.168.236.86 bcast=192.168.236.255 nmask=255.255.255.0
Sending queries to 192.168.236.86 192.168.236.86 _ _SAMBA_ _
You should get the IP address of the server, followed by the name
_ _SAMBA_ _
, which means that the server has successfully advertised that it has a service called
_ _SAMBA_ _
, and therefore at least part of NetBIOS nameservice works.
-
If you get "Name_query failed to find name _ _SAMBA_ _" you may have specified the wrong address to the
-B
option, or
nmbd is not running. The
-B
option actually takes a broadcast address: we're using a machine-name to get a unicast address, and to ask server if it has claimed
_ _SAMBA_ _
.
-
Try again with
-B
ip_address
, and if that fails too,
nmbd isn't claiming the name. Go back briefly to "Testing daemons with testparm" to see if
nmbd is running. If so, it may not claiming names; this means that Samba is not providing the browsing service - a configuratiuon problem. If that is the case, make sure that
smb.conf doesn't contain the option
browsing
=
no
.