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

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?
sctowneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

becraigCommented:
Yes simply edit the host file and point server1 to 127.0.0.1
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:
http://www.sysprobs.com/how-to-edit-host-file-in-windows-8-1-8
0
Mitchell MilliganInformation Technology Network AdministratorCommented:
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.
0
sctowneAuthor Commented:
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
127.0.0.1      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?
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Seth SimmonsSr. Systems AdministratorCommented:
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 127.0.0.1 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
0
sctowneAuthor Commented:
Mitchell:
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

Thanx!
0
Seth SimmonsSr. Systems AdministratorCommented:
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 127.0.0.1 works
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sctowneAuthor Commented:
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.
0
Mitchell MilliganInformation Technology Network AdministratorCommented:
sctowne:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.