nmbd (NetBIOS Name Service Daemon)
nmbd is another key component of the Samba suite, responsible for providing NetBIOS services. It handles the NetBIOS over IP (NBNS) protocol, which allows machines on the same network to locate and communicate with each other by their NetBIOS names. This is primarily for compatibility with Windows systems, which rely on NetBIOS for name resolution in older networking environments.
Key Functions of nmbd:
nmbd:NetBIOS Name Resolution: Provides mapping between NetBIOS names (human-readable) and IP addresses. This allows clients to access servers and services using friendly names instead of IP addresses.
Network Browsing: Enables browsing and discovery of shared resources like files and printers on the local network (Windows workgroup or domain).
WINS Server: Can act as a WINS (Windows Internet Name Service) server, which centralizes the NetBIOS name-to-IP address mapping across a network, improving name resolution in larger networks.
Configuration and Management:
The
nmbdservice is configured through the/etc/samba/smb.conffile alongsidesmbd.It is usually installed and run together with the
smbdservice.Like
smbd, it is managed using systemd or service commands.
Common Commands:
Start/Stop/Restart
nmbd:sudo systemctl start nmbd sudo systemctl stop nmbd sudo systemctl restart nmbdCheck Status:
sudo systemctl status nmbd
Example Configuration (/etc/samba/smb.conf):
/etc/samba/smb.conf):[global]
workgroup = WORKGROUP
server string = Samba Server %v
security = user
wins support = yes # nmbd acting as a WINS serverwins support = yes: Configuresnmbdto act as a WINS server. This helps in name resolution, especially for larger networks.workgroup: Defines the Windows workgroup the Samba server will participate in.
Key Files and Directories:
/etc/samba/smb.conf: Main Samba configuration file, also used bynmbd./var/log/samba/: Log files for Samba, including logs for thenmbdservice.
NetBIOS Name Resolution:
NetBIOS names are used by Windows systems to identify each other on local networks. When a machine attempts to resolve a name, nmbd either responds to the request (if it knows the name) or forwards it to a WINS server.
Common NetBIOS-Related Files:
/var/cache/samba/wins.dat: Contains the database of NetBIOS names and IP addresses ifnmbdis acting as a WINS server./var/log/samba/log.nmbd: The log file fornmbdservice, useful for troubleshooting NetBIOS name resolution issues.
Security Considerations:
WINS Security: If the Samba server is acting as a WINS server, ensure only trusted systems can access it. Misconfigured or untrusted clients can introduce invalid name records, affecting name resolution.
Legacy Protocol: NetBIOS is considered somewhat outdated. For modern environments, it's recommended to use DNS-based name resolution over NetBIOS wherever possible.
Integration with smbd:
smbd:nmbdandsmbdWork Together: Whilesmbdhandles the file-sharing and authentication,nmbdfacilitates the browsing and name resolution across a Windows-style network. Both services are often used in tandem, butnmbdis not always necessary in environments that rely solely on DNS.
Disabling nmbd:
nmbd:If you're using DNS and no longer need NetBIOS name resolution:
Disable the Service:
sudo systemctl disable nmbd --now
Last updated