Is there a way to "spoof" a UNC path on a local Win 8 workstation?

Posted on 2014-07-18
Last Modified: 2014-07-23
A client has a custom application that uses a lot references to files using UNC paths on their file server (i.e. \\server1\data).
He wants to run a copy of this application on his local WIn8 workstation separate from the server. (completely separate and independent from the server version)   He's copied all the applicable files to an identical file structure on his C: drive.  It is not feasible to change all the references to the UNC server path in the code and data.  Is there a way to convince the Win8 workstation that \\server1\data = c:\data?
Question by:sctowne
    LVL 28

    Assisted Solution

    Yes simply edit the host file and point server1 to
    Then create a share named data that points to that folder.

    However bear in mind that means all communication to server1 will go to the local machine.

    Instructions on editing the host file:
    LVL 3

    Expert Comment

    by:Mitchell Milligan
    I don't recommend editing the host file, as this is not best practice.  However if you share the root of that file out and then use the unc path of the same computer name they are on they can then access those resources.  The problem with editing the host file here is that no resources from server1 will be available for other purposes as the local workstation will always be looking at itself for any resource on server1.  Also, be careful of the licensing requirements of the software, they may not be permitted by the software eula to run multiple copies like that.

    Assisted Solution

    Thanks for the prompt reply, but so far it's not working.  Here's what I did ...
    I edited c:\windows\system32\drivers\etc\hosts as admin, adding the line      SERVER1

    I then created a share for C:\data named data.

    an attempt to do a dir on that directory via the new UNC path fails...
    C:\>dir \\server1\data
    Logon failure: unknown user name or bad password.

    What did I miss?
    LVL 34

    Expert Comment

    by:Seth Simmons
    there are also security features in place (since XP SP2/2003 SP1) for running services on the loopback adapter
    i tested a share by connecting to and it rejects any local or domain credentials i put
    using the regular name works fine.  primarily related to spoofing of names was the security issue mitigated

    Author Comment

    Generally I would agree.  Licensing isn't an issue in this case, as the software was written in-house and he has permission to use the app locally.  In this case the PC in question is his home PC, and will never be connected to the domain that Server1 belongs to.
    Your solution does seem to work, provided that the user will permit me to change the name of his workstation to Server1.  (changing all the references to Sever1 in the data and code is not feasible, nor desirable)
    If there is a solution that doesn't require re-naming the PC that would be preferable

    LVL 34

    Accepted Solution

    try this...

    go in the registry to HKLM\System\CurrentControlSet\Control\LSA
    right click LSA and select new dword
    name it DisableLoopbackCheck with a value of 1
    reboot and see if the UNC path to works

    Author Closing Comment

    Both the edit of the hosts file, and the addition of the registry key are necessary for the solution to work.  With both in place, it works perfectly.
    LVL 3

    Expert Comment

    by:Mitchell Milligan
    If the software was written in house, then I would challenge the idea of making unsupported and unrecommended changes to windows to make a custom software work.  Best practice would be to adjust the software so that you can utilize a variable for the UNC path, then in a basic config, set the variable and you will find that the software is now much more flexible.  This seems like a much better and safer practice to me.  Now, with this accepted fix, Windows will not loopback properly, and this may cause significant issues in the future.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    New My Cloud Pro Series - organize everything!

    With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

    When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
    Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
    This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
    The viewer will learn how to download, install and use CrashPlan from on Windows 7. Open your browser and go to Click get started, it’s free then Click the Download CrashPlan button: Click save in Internet Explorer, the…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now