Copyright

Return to index

*****************************

You will need to add 2 entries to the file. Assuming your Primary Domain Controller is names MyPDC, the PDC has an IP address of 192.168.1.1, and the domain is named MyDom. You would add:

192.168.1.1 MyPDC #PRE #DOM:MyDom

192.168.1.1 "MYDOM \0x1b" #PRE

In the second entry, the '\' of the special character '\0x1b' (that's BackSlash-zero-ex-one-bee) must be the 16th character of the name. Pad with spaces, as necessary. Also, this name must be enclosed in quotation marks and, at least on 95, the name must be all capital letters (I know NetBIOS names are not supposed to be case sensitive, but I didn't write the code <g>).

After you've edited and saved the lmhosts file, open a DOS window. Type 'nbtstat -R' (that's R, not r). This will flush and reload the cache. Now type 'nbtstat -c'. This will display the contents of the cache. If your entries are correct, you will see something like:

MYPDC

<03>

UNIQUE

192.168.1.1

-1

MYPDC

<00>

UNIQUE

192.168.1.1

-1

MYPDC

<20>

UNIQUE

192.168.1.1

-1

MYDOM

<1B>

UNIQUE

192.168.1.1

-1

If you don't see the <1B> entry, your domain name isn't padded correctly.

 

Note 1: The file name is lmhosts (no extension), not lmhosts.sam (this is a sample file). Just create a file named lmhosts in the same directory as the lmhosts.sam file.

Note 2: MS recommends using an ASCII only text editor (e.g. edit.com). Editors that allow multiple fonts, colors, etc. (such as Notepad) may embed 'invisible' non-ASCII characters in the file, which may interfere with parsing.

Note 3: Separate the fields on each line by multiple spaces and add several blank lines after the last entry.

*****************************