Samba – Unable to see Samba server by netbios name

file-sharingnetwork-sharenetworkingsamba

We have a linux server set up with a number of samba shares on our mixed windows/mac/linux network. The shares are accessible if we go to \\192.168.x.x\share, however we can't access the server by it's netbios name (as set-up in the smb.conf file). It's also not listed on the network, whereas all the other machines are — including the other linux machines.

We're unable to see any difference in the config of the other machines compared to this particular one, other than that they are desktop Ubuntu machines and this is a "headless" CentOS server.

Here's the config file:

[global]
  workgroup = WORKGROUP # correct workgroup name for the network
  netbios name = foobar # same as the hostname of the box
  security = share
  guest account = nobody
  local master = no # tried yes, no difference
  preferred master = no # tried yes, no difference
  ; wins support = yes
  ; dns proxy = yes

# shares are assigned here...

The netbios name is set to the same value as the linux hostname for the box, but it's still not showing on the network whether we set the netbios name in samba or not.

What else do I need to set so that the machine shows up on the network?

Best Answer

This is on samba 4.7.1

I was having the same problem as OP and alecov. Turns out, nmb service were not running.

You need to enable nmb separately from smb:

sudo systemctl enable nmb
sudo systemctl restart nmb

On samba 4 the service names is smb and nmb, somehow needlessly renamed making many available tutorials to be confusing (they are mostly based on samba 3).

Here is my smb.conf that works to enable netbios name broadcasting:

        workgroup = WORKGROUP
        netbios name = XXXXX
#       disable netbios = yes
        wins support = yes
        name resolve order = bcast wins lmhosts

You also need to check if it bind properly with your target adapter and the samba service is allowed in the firewall.