View Full Version : Can't mount one of my Windows machines
10th April 2010, 02:20 PM
What could block access from Fedora to just one Windows XP system without blocking access to or from other Windows systems on the network?
I have a working Windows network with six computers and one network-attached-storage. Two of the computers (MARTIN and NANCY) are Windows XP, the rest are older. I set up a Fedora laptop with Samba. The Fedora system can access the Internet (I'm using it to post this message). It can see all the Windows systems, and it can open all of them except MARTIN. The firewall on MARTIN is turned off.
I go to Places, Network, and I see nine icons: the Fedora system, seven Windows systems and one for Windows Network. If I double-click on the MARTIN icon I get a message window that says "Unable to mount location" and "Failed to retrieve share list from server". If I double-click on any of the other Windows icons, including NANCY, a new window opens showing the shares on that system.
Similar results with smbclient. It shows the shares for all systems except MARTIN. For MARTIN it says "Connection to MARTIN failed (Error NT_STATUS_UNSUCCESSFUL)."
The other Windows computers on the network can open the shares on MARTIN with no problem.
The network is partly wired and partly wireless. The wireless network is secured with WEP. The Fedora laptop is (as you might expect) wireless. The Fedora laptop is an emachines E520 and both Windows XP machines are custom-built tower systems. I don't think that information is relevant but I mention it anyway.
What should I look for?
16th April 2010, 05:16 PM
Partial solution with great mystery!
I went into smb.conf and designated MARTIN as a WINS server (using its dotted quad address).
smbclient now works instantly and I used it to transfer a file from MARTIN to the Fedora system.
Opening MARTIN by double-clicking its icon in the Network window still fails.
"ping MARTIN" used to complain about "unknown host." Now it sends to an external dotted quad IP address and receives no replies. Pinging other nodes on the local network by name still gives "unknown host." Pinging network nodes by dotted quad IP address works OK.
Does anybody know what's going on here?
16th April 2010, 05:36 PM
There's no mystery here. Even if you have samba installed and running on a Linux machine, the main Linux TCP/IP stack is still not set by default to attempt to resolve NetBIOS names. See the /etc/nsswitch.conf file. The default is:
hosts: files dns
It means the box in question will attempt to resolve names by the /etc/hosts and (I think) the lmhosts files, and then query the dns servers set in /etc/resolv.conf. Since that line in the default nsswitch.conf file doesn't say anything about resolving via NetBIOS/WINS names, the networking stack won't even try unless you edit the file.
I did a little writeup on getting it to work.
Forgive the plug: http://www.vanwykipedia.com/doku.php?id=technical:netbios
16th April 2010, 09:02 PM
Thanks for explaining why the Linux box was the only network node that couldn't open shares on MARTIN.
I edited /etc/nsswitch.conf to add wins to the hosts: line and restarted smb. Now I can open MARTIN from the icon and I can ping the network nodes by name.
But there are still several mysteries:
1. Why did designating MARTIN as a WINS server do anything useful when MARTIN runs XP Home edition and WINS servers are only supposed to exist in server OS editions?
2. Why was MARTIN the only node on the network I couldn't open from the Linux box?
3. Why is it so hard to find out how to make things work in Linux?
16th April 2010, 09:59 PM
If there are any "mysteries" here, I don't think they're on the side of the Linux box. It's probably either a problem on the Windows side of things or problems related to the NetBIOS protocol itself.
I don't know about the first two questions. As for #1, making the change didn't make MARTIN suddenly start behaving like a WINS server because frankly MARTIN doesn't know or care what's in your Linux box's smb.conf. So, frankly, that change shouldn't have fixed anything.*
And, either way, if you didn't have wins in nsswitch.conf, the only thing the WINS server line should change is smbclient's means of resolving names - not the regular Linux TCP/IP stack's order of name resolution.
"Connection to MARTIN failed (Error NT_STATUS_UNSUCCESSFUL)."is, furthermore, a very generic error. I've seen this one go away even after a brief nap. A thousand and one things could have been going wrong.
3. Why is it so hard to find out how to make things work in Linux?
Flip the question around. Why is it so hard to get a Windows machine to connect to an NFSv4 server? :p
As long as knowledge is present, changing a few lines in config files isn't "hard." If anything's difficult here, it's that NetBIOS itself is an old school, weird, sometimes unpredictable, and sometimes inefficient protocol with a long history of being expanded and rewritten. I'd imagine a number of things about Samba's code are reverse-engineered or hackish.
Not only that, but the typical mode of operation of NetBIOS name resolution is via a broadcast system. As with other broadcast systems, this can be problematic. NetBIOS networks that operate primarily on broadcasting (without WINS) are frankly prone to getting transient issues that may even spontaneously solve themselves while you're trying to troubleshoot them. Peer to peer type systems - including Windows workgroups - are prone to transient issues.
* Wild speculation: The only guess I can hazard is that making the change in smb.conf changese the type of node samba and smbclient will emulate (p-node, b-node, h-node, etc). My guess would be that smbclient and samba operate as b-nodes by default. Perhaps MARTIN was ignoring NetBIOS broadcasts from your Linux box - it might do this if for some reason it views the Linux machine's NetBIOS broadcasts as malformed for some reason. Perhaps by specifying a "WINS server" in smb.conf, that changed samba's effective node type from b-node to p-node or h-node. Maybe MARTIN would respond to unicasts but not broadcasts for some odd reason.
17th April 2010, 03:39 AM
Thanks, forkbomb. Two things you just said look helpful. One is flipping the question. You're right, it's not Linux, it's Linux against Windows. Linux seems to be OK as long as I'm not trying to make it work with Windows, like Samba or Wine. The other is that your "wild speculation" is the only explanation that makes any sense of what I observed. I guess the great mystery, after all, is how Windows works. And thanks to you I've got my net working.
Tukrah Instagram Photos
- Al Manshah Photos on Instagram
- Lutuhyne Photos
vBulletin® v3.8.7, Copyright ©2000-2014, vBulletin Solutions, Inc.