Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing by server name via hosts file

Status
Not open for further replies.

BlZ

Technical User
Mar 14, 2002
12
0
0
US
I don't know what it's called when you \\to_a_server, so it's tough to search on it.

I am tunneling SMB over SSH2, so I set up my hosts file to be: 127.0.0.2 myserver

When I ping 'myserver' from a command line it works, but when I \\myserver it fails. I am on a corporate network, DHCP (WINS via the dhcp server).

Any idea how to make this work?

Thanks
 
You're connecting to a resource when you "\\" it, but you need to connect to \\<server_name>>\<share_name>. For example, you don't map to \\my_server you map to \\my_server\my_share.

-If it ain't broke, break it and make it better.
 
Thanks,

When I \\127.0.0.2, I get the folders that are shared ; I don't need to specify a destination share name.

When I \\myserver, it fails.

The error, is that Windows cannot find the server.
 
What kind of error message are you getting?

-If it ain't broke, break it and make it better.
 
Windows cannot find "\\myserver". Check the spelling and try again, or try searching for the item by clicking the Start button and then clicking Search.

It's as if you try to \\ to a machine that doesn't exist.

I am just curious as to why it's not reading the server name from the c:\winnt\system32\drivers\etc\hosts file ... but it reads the hosts file if you "ping" myserver.
 
First, the hosts file resolves IPs to host names. Lmhosts resolves IPs to netbios names. Typically they are the same, but not always. It gets real messy when mixing the two. Check out faq616-807 for more detailed information.

-If it ain't broke, break it and make it better.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top