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.
- Log into your Ubuntu Server via SSH or local console using an account with
sudoprivileges. - First, stop the active service to immediately halt the UDP broadcasts:
sudo systemctl stop nmbd.service - Next, disable the service so it does not attempt to start during the next system boot:
sudo systemctl disable nmbd.service - To guarantee that the primary
smbdservice or any other network script cannot accidentally wake the daemon, mask the service unit entirely:sudo systemctl mask nmbd.service - (Optional) If you want to configure Samba to completely ignore NetBIOS internally, edit
/etc/samba/smb.confand setdisable netbios = yesunder the[global]section, then restartsmbd.
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.