[Scottish] Most definitely off topic

William Anderson scottish at mailman.lug.org.uk
Thu Aug 29 00:07:01 2002


Michael Cameron wrote:
> A windoze question if you can bear with me (sorry).
> Is there a windows equivalent of /etc/nsswitch.conf?  How do I ensure
> that a hosts file is used before DNS?

By default, Windows checks in order:

  self, %systemroot%\system32\drivers\etc\hosts [1], dns, netbios

You can change this priority order in the Registry as per the instructions
in Knowledge Base article Q139270 - see
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q139270 for more
information.  Q172218 is also a good primer on the basics of this
functonality and the vanilla state.

[1] note that this is a winnt/2k/xp path - the path to hosts on win9x
platform (95,98,Me) is %systemroot%\hosts (e.g. C:\WINDOWS\hosts)

Sorry for the 'doze intrusion, but this *is* handy stuff to know in a mixed
environment - e.g. web development on a doze box, with an Apache server on a
Linux box, and you can bung entries in the hosts file to test virtual hosts
... In the interim, however, /me hides his MCSE :)

--
_ __/|   ___  ___ __ _________  "Hell hath no fury like a woman scorned
\`O_o'  / _ \/ -_) // / __/ _ \  for Sega." -- Brodie, 'Mallrats'
=(_ _)=/_//_/\__/\_,_/_/  \___/ @ well.com :: William Anderson
   U - Ack! Phttpt! Thhbbt!     http://neuro.me.uk/