3

I have a network share on a machine that I can only reach by IP address. I then defined an alias for the IP in my hosts file so I could use that instead of the IP but then I can't log on to the share, I just get the logon prompt again and again. So basically this:

\\172.17.0.48\SomeShare

works but this

\\myalias\SomeShare

doesn't. myalias is defined in c:\windows\system32\drivers\etc\hosts as

172.17.0.48 myalias

And I can use the alias for remote desktop without problems.

Can anyone tell me why this doesn't work for fileshares?

2
  • Ok, it seems the editor ate my double backslashes at the beginning of the shares. Testing: \\someserver
    – Einar Egilsson
    Feb 1, 2010 at 8:40
  • Does the alias match the machine name?
    – Maxwell
    Feb 1, 2010 at 9:35

4 Answers 4

3

The problem is that the server doesn't know that it should respond to incoming SMB traffic destined for the alias name. Basically, the server isn't "listening" for SMB requests targeted at the alias. Follow the steps in this article to get it working:

http://support.microsoft.com/kb/281308/

Disable strict name checking on the file server:

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

Unfortunately, hosts files and DNS work fine for most services, but netbios based requests are not one of them. We've also had this issue, and possibly the best solution I can suggest would be for you to implement DFS if you positively must create a file-share "alias".

If that's not possible, then you might want to explore the possibilty of setting up an NFS or SSHfs gateway, either of which will work fine with your alias.

1

Original poster solved it 10 years ago and posted the answer as a comment.

Ok, it seems the editor ate my double backslashes at the beginning of the shares. Testing: \someserver – Einar Egilsson Feb 1 '10 at 8:40

0

Why not use the machine's real name so you don't have to DisableStrictNameChecking? Or, are you sure you can't get the machine into DNS? HOSTS files tend to be forgotten about and cause problems later if the host's IP changes.

You must log in to answer this question.