Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is a central HOSTS file on a LAN available?

Status
Not open for further replies.

dibbkd

IS-IT--Management
Oct 12, 2002
100
US
I have a seven PC LAN, all with the same modified HOSTS file. Of course by default it's located in c:\windows\system32\drivers\etc folder.

Whenever I make a change to the HOSTS file, I have to then go and copy it to every PC. Not a huge deal, but it would be nice if I could have one copy of the HOSTS file on the server, and have all the PC's just point to that location for the HOSTS.

Is there a way to do this, or another way around this issue?

Thanks!
 
Why not just "push" a copy during logon with the logon script.

Just use a copy statement to replace HOSTS from the server to each workstation.
 
method 1: setup a DNS server (timeconsuming, and probably overkill for a 7 PC LAN!)

method 2: use 1 PC as the standard, use a script to pull the file on startup (add to startup menu) / at regular occassions (add the script to the task scheduler)
Code:
net use f: //servername/share
copy f:\hosts. c:\windows\system32\drivers\etc
net use f: /delete

(see microsoft's technet site for syntax of the 'net use' command:
<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 

What a pain eh? HOSTS files must always reside on the client computer to enable DNS name resolution.

If you were using LMHOSTS, you could have centralised your name resolution method using the #INCLUDE# statement.

I don't understand why this couldn't have been applied to the HOSTS file. Oh, well.
 
Thanks guys, I tried the copy statements, that works pretty good but was wondering about a central HOSTS file.

I'll check out the scheduler option too, hadn't thought of using that.

I am in the process of setting up a Windows 2003 server, I guess then the DNS will take care of this.

Thanks for the comments!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top