0

Two weeks ago our IT department migrated a huge network folder from an older server to a newer one. For example, the older folder was reachable under

 \\oldserver\ourfolder

and the new one under

 \\newserver\ourfolder

Note the old server is still in use and visible in our companies network, \\oldserver\ourfolder was archived in between and deleted from the server.

Now we found out that there are several files (actually CAD files in some proprietary binary format) having hardcoded references pointing to the old folder location. Since there are several of those files, we would like to write a program to change those references to the new location. Unfortunately, the CAD system's VBA interpreter will only allow this when the referenced files are visible under the old network path. Otherwise, it will stop execution with an error message

So what we need here is a way to make "oldserver" an alias name for "newserver". This should be done only temporary, and only for one machine (a Windows 7 client), so our first idea was to use the hosts and lmhosts files for this. But this apparently does not work. We added a line of the form

   <new.server.ip.address> oldserver

to the hosts file and

   <new.server.ip.address> oldserver #PRE

to the lmhosts file. ping oldserver then shows the new IP address, but this does not have any effect on the shared network folders, for example, displayed by the Windows explorer, or other applications like our CAD application.

Second thing we tried was to setup an isolated DNS server on the local machine with the old server pointing to the IP address of the new one, and using "127.0.0.1" as preferred DNS (and no, we did not forget to flush the DNS cache by ipconfig /flushdns). After this, nslookup oldserver shows the expected IP address of the new server, but Windows Explorer still sees the old server under its name.

I guess this has something to do with WINS and how NetBIOS name resolution works, but I have no clue what I could try else.

Note this is about the way one client sees the network, so I think it must be possible not to change anything on the involved servers, only the client.

Doc Brown
  • 101
  • 3

1 Answers1

1

Try this registry key in the newserver

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters
DWORD name: DisableStrictNameChecking
DWORD value: 1

As if not set, your file server will not serve file content on DNS name not as his own, for security's reason.

Edit: I would desactivate the WINS/NetBios too on the Windows 7, as it bypass your local hostfile / nslookup. A nslookup check against the DNS/hostfile, and if explorer show the bad content, then the computer got is answer by WINS.

yagmoth555
  • 16,758
  • 4
  • 29
  • 50
  • See my edit, I would really prefer a solution where nothing at the server has to be changed, Our IT department won't easily change a server configuration which might influence the security of the server. – Doc Brown May 07 '18 at 16:58
  • Try only to remove only the WINS/NetBIOS then from the computer, if the registry key is set you will be ok. (ipconfig /fushdns if you dont restart the win7) – yagmoth555 May 07 '18 at 16:58
  • Doc Brown, the problem is that the new server won't answer to the name of the old server without disabling Strict Name Checking on the new server. Without that, I'm afraid what you're asking isn't possible. – joeqwerty May 07 '18 at 17:04
  • @joeqwerty: maybe I misunderstood something, but shouldn't the client first resolve the server name to an ip address and then use that ip address to reach the server? And even if the used server name is transferred to the fileserver, isn't there a way to make the client remap the old server name to the new one *before* it sends anything over the network? – Doc Brown May 07 '18 at 17:09
  • @yagmoth555: I switched off NetBIOS over TCP/IP (and flushed the DNS cache), but the Explorer still displays folders of the oldserver under the name ´\\oldserver`. Any idea? – Doc Brown May 07 '18 at 17:17
  • 1
    @DocBrown removed LLTD too ? on the NIC – yagmoth555 May 07 '18 at 17:21
  • 2
    @Doc Brown: It's true that the name will be resolved to an ip address and then ultimately to the MAC address of the new server... but the application layer protocol being used to communicate with the new server to access the shared folders is SMB. The SMB Tree Connect packets will have the UNC path of your request (\\oldserver\share) and therefore the new server needs to answer to the name of the old server. Here's a sample from one of my servers to illustrate my point: SMB2: C TREE CONNECT (0x3), Path=\\w2k8r2dhcpdns2\IPC$. – joeqwerty May 07 '18 at 17:30
  • @yagmoth555: well, I admit I had to Google first what LLTD is, and how to find it on my german Windows UI, but I think I got it and disabled it - which has no effect in the explorer :-( – Doc Brown May 07 '18 at 17:32
  • @joeqwerty: thank you very much for this information. Isn't there some kind of network hack or driver which could remap the UNC path in those SMB packets? – Doc Brown May 07 '18 at 17:34