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:
192.168.220.100 hydra
192.168.220.101 phoenix
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:
192.168.220.100 hydra#20
192.168.220.100 simple#1b
192.168.220.101 phoenix#20
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