LMHOSTS is the standard LAN Manager hosts file used to resolve names into IP addresses on the system. It is the NBT equivalent of the /etc/hosts file that is standard on all Unix systems. By default, the file is usually stored as /usr/local/samba/lib/LMHOSTS and shares a format similar to /etc/hosts. For example:
The only difference is that the names on the right side of the entries are NetBIOS names instead of DNS names. Because they are NetBIOS names, you can assign resource types to them as well:
Here, we've assigned the
hydra machine to be the primary domain controller of the
SIMPLE domain, as indicated by the resource type <1B> assigned to the name after
hydra's IP address in the second line. The other two are standard workstations.
If you wish to place an LMHOSTS file somewhere other than the default location, you will need to notify the nmbd process upon start up, as follows:
nmbd -H /etc/samba/lmhosts -D
Extract from O'Reilly book "Using SAMBA"