LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-07-2013, 06:18 PM   #1
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Can't browse samba shares when using NM/wireless?


Related to other threads I started recently, today I tried browsing samba shares using konqueror and dolphin. In the location bar I typed smb:/ and pressed Enter.

I'm using NetworkManager (NM). When I'm connected via wired, konqueror and dolphin discover and display the samba shares on my network. I can repeat this on several systems. So far so good.

When I connect via wireless, konqueror and dolphin are unable to discover any shares and display a message my firewall might be blocking.

Disabling the firewall makes no difference.

Is anybody able to confirm this oddity? Or what grand conceptual error I'm making?

Thanks.
 
Old 10-08-2013, 01:05 PM   #2
Nh3xus
Member
 
Registered: Jan 2013
Location: France
Distribution: Slackware 14.1 32 bits
Posts: 211

Rep: Reputation: 57
Hi Woodsman,

I'm using NM as well on my -Current laptop along with Xfce and Thunar.

Since the built-in smb:// in Thunar is buggy on my system, here's how I do :

When I'm connected to my personal wireless network, I just mount the Samba share (that are password protected) I need as root like this :

Code:
 # mount -t cifs //192.168.1.XX/My_samba_share /media/mount_point/ -o user=my_user,password=my_password
After that, the Samba share shows up in Thunar and I can browse and copy some stuff with no hassle.

I admit this is not really a "on the fly" method, but that's how I roll.

Hope this helps
 
Old 10-08-2013, 03:14 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Thanks. The problem is not mounting but browsing. The smb:/ protocol works fine with wired and fails with wireless. Browsing with smb:/ should display the shares.

At this point I don't know whether the problem is the smb:/ protocol or NetworkManager.
 
Old 10-08-2013, 03:22 PM   #4
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
What do you have in the [global] section on /etc/samba/smb.conf? You may need to add your wireless interface:

interfaces = eth0 wlan0

I know it's strange that this matters on a client, but there it is...
 
Old 10-08-2013, 05:54 PM   #5
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
The samba server does not have a wireless interface.

The problem occurs when using my wireless laptop to connect to the samba server using the smb:/ protocol and only when using wireless. Connected to the samba server when wired works fine.

Further, smbclient -L works fine with either wired or wireless.
 
Old 10-08-2013, 07:30 PM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
I meant a wireless interface on the client, not the server. Some client apps read smb.conf to find which interface to use. I had this problem once.
 
Old 10-08-2013, 07:37 PM   #7
Nh3xus
Member
 
Registered: Jan 2013
Location: France
Distribution: Slackware 14.1 32 bits
Posts: 211

Rep: Reputation: 57
At this point, I think your computer doesn't get the proper route(s) that are needed in order to reach the server.
 
Old 10-08-2013, 07:45 PM   #8
FeyFre
Member
 
Registered: Jun 2010
Location: Ukraine, Vinnitsa
Distribution: Slackware
Posts: 351

Rep: Reputation: 30
I think it is problem of SMB protocol itself. Very ofter one of my desktop PCs cannot enumerate shares on notebook connected to LAN via Wi-Fi router(and both have Windows OS installed). Afaik SMB does not like long latencies(or rather its default settings).
I remember built-in into Midnight Commander SMB client also has connection problems(even on 100MiB LAN NIC) because of its natural "slow motion". I think the same could be applied for graphics-oriented clients(Wi-Fi latency multiplied by client latency).
(since "smbclient -L" does not do extra work(maintaining UI for instance) it can really work perfectly here)
I don't know if my assumption is very truth, but if you know any setting which can influence such latencies I think it worth to try to tune them up.
 
Old 10-08-2013, 10:59 PM   #9
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
SMB network browsing uses two computers to keep the list of computers on the network. One of the computers is designated as the "Master Browser" and the other is designated as the "Backup Browser". You can set a computer to be the "master browser" using a registry setting. You should only do that for one computer on the network that will always remain on and connected. You can designate other computers as backup browsers by enabling a registry setting called "maintain server list". You need one backup browser for every group of 30 computers. You should disable "maintain server list" for computers that are often shut down or disconnected from the network.

If you don't designate a computer as the "master browser", all the computers running the network browser service broadcast "election" messages and decide which computer will be the "master browser". That can cause problems because an undesirable computer may be chosen. Newer versions of Windows are preferred over older versions without regard to the type of network connection or computer performance. Backup browsers are chosen in a similar fashion.

To manually chose computers to maintain the server list you can change these two settings.

Master Browser Yes / No
Maintain Server List No / Auto / Yes

The "Auto" setting allows a computer to maintain the server list but does not force it. No, prevents a computer from maintaining the server list. Yes, forces a computer to maintain the server list. You normally only want one computer besides the master browser to maintain the server list. I don't know where these settings are in Linux SAMBA, but they should be available.

The list of servers is maintained using network broadcasts to UDP port 138. In order for a computer to maintain the server list it must be able to receive broadcasts on UDP port 138. A computer acting as a browse server must be able to accept TCP connections on port 139 or 445 (SMB), UDP port 137 (NETBIOS name resolution) and UDP port 138 (NETBIOS datagram). Wireless networks or networks connected with certain kinds of switches might not reliably forward the broadcasts to other computers. That typically causes some or all computers to not see the list of computers.

You can avoid a lot of problems by setting up a computer as a WINS (Windows Internet Name Service) server. Then designate that computer as the WINS server on all the other computers that you want to see in the browse list. That way computers explicitly notify the WINS server that they exist (not using broadcasts) and computers that want the browse list know the WINS server computer to ask (not using broadcasts). To support computers that don't have a WINS server configured you can enable WINS proxy to act as a "master browser". The WINS server will respond to broadcasts requesting the list of computers and broadcasts registering new computers in the list. Only Server versions of Windows can be a WINS server, but of course any version of Linux can be a WINS server. All computers can use a WINS server to obtain the browse list and look up computer names.
 
Old 10-08-2013, 11:58 PM   #10
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Another thing that I should mention is that you must run the SAMBA server on Linux if you want to see the list of computers or specify computers by name. When SAMBA is not running, you can still enter the IP address of a computer (or use a name defined in "hosts" or DNS). However, the SAMBA server seems to maintain the list of computers. I.E. the SAMBA server provides both the SMB server and the computer browser function along with NETBIOS name service. I think that is because Linux does not have a separate NETBIOS service, and NETBIOS is part of the SAMBA server software.

If this all seems confusing, keep in mind that there are really three separate functions involved in accessing computers.
  1. Computer Browsing (browser service)
  2. Computer Name Resolution (NETBIOS or "lmhosts" or "hosts" or DNS)
  3. SMB communication (NETBIOS or TCP)

Computer browsing only provides a list of available server names. It does not provide the IP addresses. The computer browsing uses UDP port 138 (NETBIOS datagram) for broadcasting elections and announcements by computers that they exist. Computer browsing uses UDP port 137 (NETBIOS name service) to resolve addresses of master and backup browse servers. Even though WINS can resolve names, it doesn't provide browsing. You can make the computer running WINS server also be a browser master, but computer browsing still has to use broadcasts to locate the browser master. The trick to making browsing reliable is to make sure that the master browser and backup browsers are assigned predictably to appropriate computers. One of the more annoying aspects of computer browsing is that there is no equivalent to the "hosts" or "lmhosts" file to force computers to appear in the browse list. One can create shortcuts containing computer names for frequently accessed locations.

Computer Name Resolution converts a server name into an IP address for the server. SMB can use a number of name resolution methods and tries all of them until a name is resolved.
  • hosts file
  • DNS Server
  • lmhosts file
  • WINS server
  • NETBIOS Name Service (broadcast to UDP port 137)

When SAMBA is not running on Linux, there are less ways to resolve computer names.
  • hosts file
  • DNS Server

SMB communication uses either NETBIOS (TCP port 139) or TCP port 445. Windows connects to both ports but then disconnects the NETBIOS port if port 445 is successfully connected. Assuming that you enter an IP address rather than a computer name, SMB communication does not require name resolution or computer browsing in order to work.

I don't know if Linux can use other protocols besides NETBIOS datagram to maintain the list of available computers. If it can, then there may be other ways to have computer names appear in the list.
 
Old 10-09-2013, 01:59 PM   #11
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Original Poster
Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
I appreciate all the help and information!

Right now the smb:/ protocol is working.

Yesterday while investigating further I saw the protocol fail to browse, as I originally described. Then the protocol started working again.

I thought the problem was NetworkManager (NM) toggling between wired and wireless. I looked at the iptables firewall too, because NM is temperamental with respect to iptables.

I am unable to repeat the problem with certainty. At this point I don't know how to trigger the problem. Using smb:/ works always with wired, seems to now work for wireless most of the time. I've been trying different things, but thus far I'm unable to pinpoint a root cause when smb:/ fails to browse.
 
Old 10-10-2013, 12:08 AM   #12
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by Woodsman View Post
I am unable to repeat the problem with certainty. At this point I don't know how to trigger the problem. Using smb:/ works always with wired, seems to now work for wireless most of the time. I've been trying different things, but thus far I'm unable to pinpoint a root cause when smb:/ fails to browse.
If you are using KDE then you may have a problem with one of the KDE services. You can try switching the run mode to 3 and then back to 4 if the problem happens again. It should restart the KDE services. Also, check the log files for any errors.

Because of the way master browsers and backup browsers are chosen, network browsing can stop working for around 15 minutes after you turn off a computer. You should designate a computer to be the master browser and another computer to be a backup browser. If you're not sure which computers are being used for network browsing there are some Windows Resource Kit utilities that can display the information about network browser computers.
 
Old 10-12-2013, 02:36 AM   #13
rico974
LQ Newbie
 
Registered: Aug 2011
Location: Reunion Island
Distribution: Slackware 15
Posts: 15

Rep: Reputation: Disabled
Hi Woodsman, all,

I had a similar issue once, wired no problem, wireless internet access ok but impossible to reach any devices of any kind in the network. It was router related with a wireless isolation option activated by default (nice security option when you propose guest access to your network).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
samba - unable to browse windows shares by name Aoxo Linux - Networking 2 04-30-2009 11:33 AM
Cannot browse samba shares exvalvesetdabbler Linux - Networking 2 12-19-2007 10:10 AM
Unable to browse to samba shares bigman51 Linux - Software 3 07-12-2007 02:01 PM
VPN connected, but can't browse samba shares Likeon Linux - Software 3 11-08-2006 04:02 PM
can mount samba shares, but not browse them broxtor Linux - Software 0 11-19-2004 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration