Samba shares: work under Windows, don't work under Ubuntu

Greetings from Sunny Spain 8)

My little homelan is composed of a laptop windows computer & two desktop computers, say A & B, under Ubuntu 6.06 and 7.04. Both of them are file servers, so I have some folders shared using samba. The laptop is a new Dell and I could get it cheaper with Vista than with Ubuntu (go figure...)

So, the shares are under Ubuntu. The windows laptop computer can access them faultlessly. But A & B cannot see each other shares. They cannot even see the "workgroup" lan.

I've tried several faqs, including some from samba.org. But I've not nailed down the problem. I've only noticed that, althought the /etc/samba/smb.conf states that dns are not allowed, when nmbd ask for A from B (or B from A) it goes outside my homelan and to Internet (it checks for IP adresses of my ISP).

Because I can dual boot A & B to windows xp, I've checked out whether under windows A can "see" ubuntu B shared folders and viceversa. They both do.

Looks like the samba-server side works perfectly, but the client side does not for no reason I am aware of. It's driving me nuts.

Any help would be very very very much appreciated. Thanks for reading this desperate plea 8)

Re: Samba shares: work under Windows, don't work under Ubuntu

Originally Posted by jemdos

Both of them are file servers, so I have some folders shared using samba.

Are they set up as servers - or as desktops running Samba Server? I suppose actual question is whether they have GUI or not.
... Which leads to: how are you checking from A>B or B>A.
I'm wondering if the servers have an addressing problem - since they're trying to go outside the LAN.

Re: Samba shares: work under Windows, don't work under Ubuntu

Re: Samba shares: work under Windows, don't work under Ubuntu

Thanks for answering, sorry about myself answering with such delay. 8(

The desktop computers are desktops running samba server, they both do other duties 8)... and they both run samba clients. Both run under gnome GUI all the time.
Checking A>B and B>A is done atempting to do Places > Net (my system is not in english) under the gnome top menu bar.
I do think there's an addressing problem, but I think there's also a firewall problem (iptables/firestarter) thought I'm not sure how to rule it out.
For instants, I allow SMB traffic to the IPs of my LAN, but it keeps stopping part of the traffic. It rejects some connections to the typical SMB ports, thought I keep saying to the firewall it has to allow them. And then again, the windows machine does indeed connect!

The shares are password protected? Hmm. One share is a NTFS folder, the other one is a linux folder. Both are shared write protected. The user/owner of both folders/files is the same, the password is the same, and the windows machine does connect to both, after asking for the correct user and password. But under linux, both A and B *even* don't see the workgroup, just that there exist a "windows lan". Moreover, disabling the firewall (firestarter) does allow one computer (A) to "see" there is a homelan, that there are three computers, but it can only browse itself. The other one (B) just sees there's a homelan workgroup, but it cannot browse anything.

Re: Samba shares: work under Windows, don't work under Ubuntu

If one of your servers is on all the time, I'd recommend option three -- a wins server. If you try this, be sure you only designate one of the machines as a wins server-- two will cause conflicts. I use Samba as a wins server, and it works very well. I think it actually makes Windows network neighborhood browsing faster.

If you don't have a server on all the time, you might try option two.

Edited to add: Firestarter can cause trouble with Samba. It might be easier to uninstall it, fix samba browsing, and then re-install Firestarter and figure out how to configure it.

Re: Samba shares: work under Windows, don't work under Ubuntu

Greetings from Sunny Spain

Thanks to all the people who have answered my question 8) The issue is not solved yet, but I've learned a lot from you all (and with my struggle against computer gnomes ).

I've almost ruled out the firewall as the culprit of this strange behaviour. I've uninstalled firestarter and things were unchanged. I have not the knowledge to battle with iptables, thought I think the traffic it keeps stopping has nothing to do with my problem. But I have to investigate that more.

I've successfully connected directly through the shares, using a web browser with the smb://user@A/sharedfolder url or under Places > Connect to server dialog. But I have to give computer all the data needed to connect: computer server, shared item, workgroup name and user. I of course have used on both computers the smbclient -a and -d commands. (I'm typing this thing without checking correct computer grammar, I think you'll understand... it's 08:00 am here and I'm writting all this before leaving home for several hours).

*But* I've narrowed the issue to at least *two* strange behaviours.

First, not A neither B could get the computer name of each other. In both cases they were checking it *outside* my lan. Both computer have a "dns proxy = no" statement which theoretically "prevent(s) nmbd to search for NetBIOS names through DNS" but, alas, they kept looking outside.

As a temporal solution, and because B computer has a IP static address, I've included its name in the hosts file of A and at least A can connect directly to the shares. In order to get to the A shares from B I have to use the IP address of A (annoying but doable).

Second, to my amazement there is no way to set up correctly the domain master of the lan. It has to be A, but no matter how much I play with both smb.conf files, what I get is (a) B becomes the master or (b) there's no master. B is Ubuntu 6.06, A is 7.10.

I need that A becomes the master because (1) it has the newest files (2) it has the files I use the most (3) it has the biggest hard drive (SATA II 500GB against ATA 300GB in B) and (4) the fastest cpu. I needed B shares as a kind of backup and recovery system, so it was not needed all the time.

But I cannot understand why Ubuntu seems to override the instructions set in smb.conf files. I've checked out both samba.org and http://www.swerdna.net.au/linhowtosambabrowse.html (great link) and followed its instructions. But nmblookup -M workgroup keeps telling me A never ever gets master.

I think this w/o master situation leads to that nautilus cannot "see" my workgroup. That's the initial issue I haven't resolved yet. The windows computer does work better under this situation because it seems vista "remembers" the computers hooked to the lan. Yesterday I had an issue just when the lan got w/o master browser. Vista showed the computers in its lan folder, but then it could no reach them, with an error that such computer did not exist. At least Ubuntu does not show computers that is not "seeing".

Re: Samba shares: work under Windows, don't work under Ubuntu

There's no Hardy involved here, though. Jemdos is using 6.06 and 7.04.

------------------------

First, not A neither B could get the computer name of each other. In both cases they were checking it *outside* my lan. Both computer have a "dns proxy = no" statement which theoretically "prevent(s) nmbd to search for NetBIOS names through DNS" but, alas, they kept looking outside.

I don't understand this either. You may be right that the problem is related. Judging by wireshark, this doesn't happen on my set-up, but places-->network does create a bunch of MDNS requests. This is because of avahi, but it doesn't cause any problems for me.

----------------------

Second, to my amazement there is no way to set up correctly the domain master of the lan. It has to be A, but no matter how much I play with both smb.conf files, what I get is (a) B becomes the master or (b) there's no master. B is Ubuntu 6.06, A is 7.10.

This makes me think something is blocking traffic and preventing A from participating in Master Browser selection. Use these two commands to double check your firewall:

Code:

sudo iptables -L

Code:

sudo iptables -t nat -n -L

The commands should output empty tables with policy ACCEPT, like so:

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

-----------------------

One other change that might help-- in the globals section of your smb.conf files, set:

It has helped, in the sense now Nautilus "sees" the computers and the shares. B is still not able to see A shares, but now knows there exist an A. A can see B (static IP) and its shares, but I cannot open them *unless* I connect to them first using "Places > Connect to Server". This way it asks me for the password, then successfully connects. So I'd say one issue is resolved through "bcast", but not the unability to get Netbios names correctly.