Remote Support Software

Provide instant remote support to customers and employees:

Click here for a free trial

Can't create Symbolic link to hosts file

I have a group of servers that require I maintain a single c:\windows\system32\drivers\etc\hosts file.

I tried to create a symbolic link to a "Master hosts" file but in doing so it completely broke name resolution on the host.
Here are the steps I performed
1. Ran CMD as Administrator
2. deleted hosts file
3. created link mklink c:\windows\system32\drivers\etc\hosts \\servername\share\master_hosts.txt
When completed from an explorer POV everyting looked and worked great. If I dragged the host file to Notepad I saw the correct master. Changes made to master were represented in the local hosts file, etc... However name resolution completely
broke.
Is it not possible to uses symbolic links on some files. Are they documented anywhere?

If it is posible is there somethign special that needs to be done?
As a side note if you are going to test this I suggest you snapshot your VM first. Simply restoring the host file does not fix it nor does rebootng.
Edit: all servers are 2008 R2

Need to support users over the internet? click here try our remote control online beta






June 12th, 2012 10:44am
Hello,
Based on your description, I also tested the issue in my environment and the result is the same with yours the symbolic link cannot be used a full replacement of the hosts file.
From my experience, this is very possibly caused by the different way used by the system, to access the system files. With this approach, the link cannot be accepted.
If you want to change some name resolutions for series of computers, why not add a CName in the DNS record? See

http://technet.microsoft.com/en-us/library/cc783826(v=ws.10).aspx

Thanks.
Regards,
Miya


Miya Yao
TechNet Community Support

Need to support users over the internet? click here try our remote control online beta






June 14th, 2012 7:13pm
Hiya,
It doesnt sound like best practise :) - Nevertheless fun to think of a solution.
Does each of the server account have permissions to the Master host file?

Need to support users over the internet? click here try our remote control online beta






June 14th, 2012 11:44pm
For some system files, sym links across the network wont work.
It seems for what youre trying to do, you would be better served with a DNS serverif you already dont have one.
Use one of the servers and assign the DNS roll and then point the remainder to use it for name resolution.

There is an amazing pack of free network admin tools. click here to download it






June 15th, 2012 10:55am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics