Samba shares show empty folders
I've seen several threads of people with a similar problem, but none of those have been able to help me out. Allow me to explain:
I have a NAS device in a 192.168.30.x network that offers a few Samba shares. If I connect my laptop, which is running Vista Business, to the same network it can browse through the shares all it likes, write to the writeable folders, etc.
The 192.168.30.x network is firewalled / NAT'ed behind a Gentoo box that separates it from a 192.168.2.x network. Port forwarding has been set up to send incoming Samba connections to the NAS device.
If I connect my laptop to the 192.168.2.x network I can still connect to the NAS device, see the shared folders (which makes me assume that my firewall is set up correctly), but they all appear as being empty.
The Samba configuration is as follows (looks fairly simple, so it should be hard to make mistakes in there ;) ):
I'm quite stumped here - any advice would be welcome.
Is that the smb.conf file for the NAS device or your laptop?
Also check the firewall settings for the Laptop. Which ports are open. Which samba services are running on the Laptop. The nmbd service needs to run for the laptop client. The smbd daemon is for the server. If the laptop doesn't offer a share you don't need it. ( I stopped the nmbd daemon and tested this out to make sure )
Try the command (from the laptop):
smbclient -L <servername>
Do you see a list of the shares?
Check if you can reach ports 139 & 445. You could use nmap: nmap <server IP>
or if you don't have nmap installed, you can see if the ports are open on the server using the telnet client:
telnet <server> 139
telnet <server> 445
You won't be able to do anything but be connected. But that is what you are testing.
Also, what are you using as a browser?
Thanks for the suggestions!
I booted the laptop to linux (I was trying in Vista yesterday, using Windows Explorer since I intend to offer these shares to other Windows-only clients) to try them out; here are the results :
venefyxatu@lap008 ~ $ smbclient -L 192.168.2.30
Domain=[PURGATORY] OS=[Unix] Server=[Samba 3.0.23c]
Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC Service (Purgatory)
Domain=[PURGATORY] OS=[Unix] Server=[Samba 3.0.23c]
So yes, there is a list of shares. That's a good start :)
That's odd - 139 tcp is the only relevant one that's shown as open, although it gets the exact same treatment as 445 tcp and 137&138 udp in the firewall. I'll look into that, see if I can find anything.
Will check the Samba 3 HOWTO & Reference handbook as well.
Thanks for the pointers!
If you have the PDF version of the Samba 3 HOWTO & Reference Guide, Search for the numbers 137, 138, 139 & 445. I'm not certain but in some cases dealing with printing services, you may need 137 open as well (RPC Endpoint).
Aside from that, I just tried accessing the shares with Nautilus from my laptop and, surprise, it works! So far I'd only tried with Windows Explorer on Vista. That one still shows empty folders, so I've decided to Blame Vista :P
I'll see if I can get my hands on something XP-ish. Maybe I can then Blame Microsoft ;)
Addendum : I got my hands on an XP client, and it works there, too. So apparently, "something" changed in Vista...
Thanks for your assistance!
Microsoft makes some changes with each version they put out. The good news is that they tend to correct their own past mistakes. Samba relies on studying how Windows works in reality by studying the network traffic rather than reverse engineering Windows code. So if MS goes closer to it's own specs, samba needs to be readjusted to undo some quirks that older clients had. What windows documentation there is may be wrong. One thing to look at is the version of Samba being used by the NAS. It may need to be updated to av version recent enough to work with Vista. Also, since the problem is with Vista, look up on the net what changes were made in Vista on how browsing works. It could be that port 445 is the only one used. Maybe vista only supports DNS or WINS. If there is a field in the network device configuration for a wins server, samba can act as one. This might help. The servers name or IP address will need to be provide to Vista, either in this configuration dialog or by entering it in your DHCP server's (or Router's) setup. I think that WINS uses port 1512/tcp (according to "getent services wins"). The winbind service on the NAS or the Linux clients may need to be enabled then.
My rough guess is that some of the older technologies, which were de-emphasized in XP are now totally dropped.
Microsoft controls the clients so that makes life more difficult for the Samba team.
To give you an idea, MS removed support from their embedded windows version that allowed a device to be used with a standalone domain controller. This is the most common configuration for Samba servers. When Jeremy Allison tried a patch to fix this, an embedded device could work with samba but everything else broke, so he had to pull the patch. The NFS4 programmers relied on the MS documentation on how ACLs worked when they adapted MS acls for NFS V4. The problem is that the MS specs were either wrong or disinformation. This is what upset the Judges so much in the anti-trust case in the EU. That case's main theme is on network interoperability.
You could also study the NAS's samba logs and see it there is traffic it isn't seeing or doesn't understand. Or run wireshare to discover which ports the Vista traffic uses.
I really don't like "security = SHARE" which the Samba documentation states is obsolete (win95). Also, I don't like force user and force group for a public share.
The "map to guest = Bad User" in the [General] section and "Guest OK = Yes" in the share definition allows unauthorized users to use the public share, but still lets authorized users to retain the permissions and acls. A Linux user can even mount a Samba share using the cifs filesystem and use "setfacl".
The WINS server refers to my Desktop's IP. That line is actually modified by when I boot up and is provided by the DHCP server of my router. My eth0 NIC failed as I was listening to a podcast, and I quickly learned how to setup and configure wireless with the bcm43xx driver in record time! Necessity is the mother of invention as they say. ( I had used ndiswrapper before SuSE 10.2 ). Later I dug up a pcmcia nic device.
In Vista make a link to a samba share like
net use z: //samba/_share \user:username
or rightclick in explorer and choose make a link
Mind you: never ever install ms-update kb942624
it screws up everything
We tested vista in our company to work with a samba server with wins active.
The shares created by the logon script appear to be empty but if you do a map network drive it worked.
Also just some network shares were empty and others not. The empty ones Vista didn't see as a networkshare but if I my memory is well it saw it as a optical device or something like that :-D
Still some problems with vista it seems to me.
They put it on new sold pc's while it is still bugged as hell typically MS.
I've heard something about the new version of samba would support Windows 2008 so I hope also vista.
|All times are GMT -5. The time now is 01:57 AM.|