2

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?

3 Answers3

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
JohnLBevan
  • 1,134
  • 7
  • 20
  • 44
joeqwerty
  • 108,377
  • 6
  • 80
  • 171
  • Above link no longer works; instead try: https://support.microsoft.com/en-gb/help/3181029/smb-file-server-share-access-is-unsuccessful-through-dns-cname-alias – JohnLBevan Dec 05 '18 at 14:17
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

Jeter-work
  • 825
  • 4
  • 15
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.

Greeblesnort
  • 1,739
  • 8
  • 10