How to Completely Disable the ‘nmbd’ (NetBIOS Name Server) Daemon in Ubuntu Server

The nmbd daemon is a core component of the Samba software suite. Its primary job is to handle NetBIOS Name Service requests, allowing your Ubuntu Server to be discoverable by its hostname within a legacy Windows network environment (the “Network Neighborhood”). If your server is purely a web server, a database node, or if your network relies entirely on modern DNS (Domain Name System) for resolution, running a NetBIOS name server is completely obsolete. Leaving nmbd active wastes system memory and unnecessarily broadcasts UDP packets (port 137) across your subnet.

This guide explains how to completely disable the nmbd (NetBIOS Name Server) daemon in Ubuntu Server while leaving the primary Samba file sharing daemon (smbd) intact.

Stop and Disable the NetBIOS Daemon

To ensure the server stops broadcasting legacy NetBIOS names, we must halt the specific systemd service responsible for this protocol.

  1. Log into your Ubuntu Server via SSH or local console using an account with sudo privileges.
  2. First, stop the active service to immediately halt the UDP broadcasts:
    sudo systemctl stop nmbd.service
  3. Next, disable the service so it does not attempt to start during the next system boot:
    sudo systemctl disable nmbd.service
  4. To guarantee that the primary smbd service or any other network script cannot accidentally wake the daemon, mask the service unit entirely:
    sudo systemctl mask nmbd.service
  5. (Optional) If you want to configure Samba to completely ignore NetBIOS internally, edit /etc/samba/smb.conf and set disable netbios = yes under the [global] section, then restart smbd.

Verify the Protocol Lockdown

By masking the service, you guarantee that your server will no longer participate in legacy Windows network discovery.

To verify the lockdown is successful, run the following command to check the status of the daemon:

systemctl status nmbd.service

The output will clearly state that the service is masked (symlinked to /dev/null) and the Active state will read inactive (dead). Furthermore, if you run sudo ss -ulnp | grep 137, you will see that the server is no longer listening on UDP port 137, confirming that the obsolete NetBIOS overhead has been completely eradicated from your network stack.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.