Hosts File Ignored Completely

S

Shane Lieberg

Both my hosts and lmhosts.sam are being ignored..

To test this fact, I created an entrey in both for www.howdydoodie.com
and then pointed that to an IP address. (127.0.0.1)

Then I set my dns servers to 127.0.0.1 so that my machine could not look it
up.

If I ping www.howdydoodie.com it fails, unknown host... it should resolve it
as
127.0.0.1

Then i added #pre to the entrey in lmhosts.sam

Same effect. so i checked my registry, and its corrects

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\
Parametersv *DataBasePath*

Please Help, I'm Lost
 
H

Hans-Georg Michna

Shane Lieberg said:
Both my hosts and lmhosts.sam are being ignored..

To test this fact, I created an entrey in both for www.howdydoodie.com
and then pointed that to an IP address. (127.0.0.1)

Then I set my dns servers to 127.0.0.1 so that my machine could not look it
up.

If I ping www.howdydoodie.com it fails, unknown host... it should resolve it
as
127.0.0.1

Then i added #pre to the entrey in lmhosts.sam

Same effect. so i checked my registry, and its corrects

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\
Parametersv *DataBasePath*

Shane,

it could be anything, but there was a recent virus that
redirected hosts file access to a different folder and file.

Hans-Georg
 
S

Steve Winograd [MVP]

"Shane Lieberg" said:
Both my hosts and lmhosts.sam are being ignored..

To test this fact, I created an entrey in both for www.howdydoodie.com
and then pointed that to an IP address. (127.0.0.1)

Then I set my dns servers to 127.0.0.1 so that my machine could not look it
up.

If I ping www.howdydoodie.com it fails, unknown host... it should resolve it
as
127.0.0.1

Then i added #pre to the entrey in lmhosts.sam

Same effect. so i checked my registry, and its corrects

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\
Parametersv *DataBasePath*

Please Help, I'm Lost

Windows uses the Lmhosts file to convert computer (NetBIOS) names, not
web site names, to IP addresses, so it's the wrong file for your
purpose. If you need an Lmhosts file for computer names, edit the
sample file "lmhosts.sam" and save it as just "lmhosts", with no file
type.

The Hosts file also must be saved with no file type. If you edited it
with a text editor, it might have been saved as "hosts.txt", which the
system won't read. Use this command to edit the Hosts file, making
sure to include the "." at the end of the command:

notepad C:\Windows\System32\Drivers\Etc\Hosts.
--
Best Wishes,
Steve Winograd, MS-MVP (Windows Networking)

Please post any reply as a follow-up message in the news group
for everyone to see. I'm sorry, but I don't answer questions
addressed directly to me in E-mail or news groups.

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com
 
R

Ron Lowe

Shane Lieberg said:
Both my hosts and lmhosts.sam are being ignored..

To test this fact, I created an entrey in both for www.howdydoodie.com
and then pointed that to an IP address. (127.0.0.1)

Then I set my dns servers to 127.0.0.1 so that my machine could not look it
up.

If I ping www.howdydoodie.com it fails, unknown host... it should resolve it
as
127.0.0.1

Then i added #pre to the entrey in lmhosts.sam

Same effect. so i checked my registry, and its corrects

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\
Parametersv *DataBasePath*

Please Help, I'm Lost


A couple of points:

Firstly,
Lmhosts does not deal with resolving DNS names like www.howdydoodie.com.
Lmhosts is for NetBIOS names, not DNS names.
It simply doesn't figure in the equation.
It's the HOSTS file you need to use.

Secondly,
The files need to be saved with no extension.
The .sam extension means SAMple.
To make the HOSTS file 'live', save it as plain HOSTS with no extension.
You may need to turn off window's absurd default 'Hide Extension for known
file types'.
Otherwise, if it's saved with a .txt extension by your editor, you wouldn't
see that.
 
S

Shane Lieberg

Ok, lmhosts.sam aside... since that one has no function (ie the sam at the
end) this same info has been in the hosts file the whole time, with no
extention.. so i still have a problem.. can you help..
 
M

Marc Reynolds [MSFT]

Is the DNS client service running on your XP box? From a command prompt type
"net start dnscache". Once the DNS client service is running type "ipconfig
/flushdns" then "ipconfig /displaydns" the contents of your hosts file
should now be displayed and you should be able to resolve
www.howdydoodie.com. If not your hosts file is incorrect.

--

Thanks,
Marc Reynolds
Microsoft Technical Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Ron Lowe

Shane Lieberg said:
Ok, lmhosts.sam aside... since that one has no function (ie the sam at the
end) this same info has been in the hosts file the whole time, with no
extention.. so i still have a problem.. can you help..



1) Ensure the hosts file has no extension
*and ensure explorer is not hiding an extension*
as per our previous replies;

2) In the hosts file, ensure the relevant line has a return at the end of
it;

3) Go to a command prompt, and issue the commands:

ipconfig /flushdns
ipconfig /displaydns

After flushing the DNS cache, the hosts file ought ot be re-loaded into
cache.
The subsequent /displaydns should show the cache containng the hosts file
entries.

See what that shows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top