12
4
I added the following line to a Windows7 hosts
file:
127.0.0.1 mecserver
Using ping mecserver
works fine, but if I use this name to connect to the notebook (like localhost) to see the Windows shares it always wants me to enter user credentials. Entering the local username + password doesn't work. Which indicates to me that the remote host is connected.
Using the following in the Windows explorer address field of local system results in:
\\mecserver
Result: I have to enter a username and password but the local user don't work
\\localhost
Result: Displays me the local shares - this is what I want with \\mecserver
\\127.0.0.1
Result: Displays me the local shares - this is what I want with \\mecserver
I want to use \\mecserver
with the result of localhost
/127.0.0.1
. Is this somehow possible?
EDIT: What I have done so far:
I shared on a Notebook a network share with the name "testshare". Without any network cable/wlan connected I try to connect to this share from this notebook. This works with \localhost\testshare and \127.0.0.1\testshare. But I need a special path for a third party program like \mecserver\testshare. So I added the line 127.0.0.1 mecserver to the host file. ping mecserver works (local from this notebook) but when I try to access the testshare with \mecserver\testshare it promts a login window. I entered the current notebook user but it says password wrong. I even added a new testuser with the name test and password test and tried to add this into this login window but it don't work (password wrong). Enabling the guest account don't help either. The share is open to everyone and the file/directory security access for this folder/files too.
Adding 127.0.0.1 mecserver to the lmhosts file has the same effect like adding to the hosts file - it promts me this login window. I removed the 127.0.0.1 mecserver line from the hosts file when I played with the lmhosts file just to be sure.
1
I had the same problem. Here is solution: http://serverfault.com/questions/23823/how-to-configure-windows-machine-to-allow-file-sharing-with-dns-alias
– Dennis Sakva – 2014-08-02T18:07:31.5201I think the
hosts
file only affects DNS lookups (which is whyping
works). When you use the double-backslash to access network shares, WINS/NetBIOS is used. – Der Hochstapler – 2012-02-07T13:45:29.017Possibly related: http://serverfault.com/a/42916/61246
– Der Hochstapler – 2012-02-07T13:48:18.247I changed the registry values and restarted the computer but it did not change anything. – hitzi – 2012-02-07T14:01:51.760
The user local to where? The client? Or the server providing the file service? – JdeBP – 2012-02-07T15:03:31.417
I added a more detailed description what I have tried. – hitzi – 2012-02-08T06:57:25.273