LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 08-27-2009, 04:22 PM   #1
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Rep: Reputation: 50
Samba + XFCE


Hi, i installed Thunar-Shares-Plugin, and use this smb.conf:

Quote:
[global]

workgroup = WORKGROUP
security = share
usershare path = /var/lib/samba/usershares
usershare max shares = 100
usershare allow guests = yes
usershare owner only = yes
But when I use smbtree, discover every machine, but not the share folders:

Quote:
smbtree
Password:
WORKGROUP
\\PEDRO-PC
timeout connecting to 67.215.65.132:445
timeout connecting to 67.215.65.132:139
cli_start_connection: failed to connect to PEDRO-PC<20> (0.0.0.0). Error NT_STATUS_ACCESS_DENIED
\\MLPA-DESKTOP Samba 3.2.13
\\MLPA-DESKTOP\share
\\MLPA-DESKTOP\downloads
\\MLPA-DESKTOP\images
\\MLPA-DESKTOP\IPC$ IPC Service (Samba 3.2.13)
\\DARKSTAR Samba 3.2.13
timeout connecting to 67.215.65.132:445
timeout connecting to 67.215.65.132:139
cli_start_connection: failed to connect to DARKSTAR<20> (0.0.0.0). Error NT_STATUS_ACCESS_DENIED
Can anyone help me?
 
Old 08-27-2009, 06:33 PM   #2
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Can you post more information about your network configuration. What's the IP address and network mask of the computer where you're using "smbtree"? What are the IP addresses and network masks of the other computers.

These messages indicate that "smbtree" could not communicate to the other computers. A firewall program could be blocking the ports on the computers or you could have a problem with IP routing.

Quote:
timeout connecting to 67.215.65.132:445
timeout connecting to 67.215.65.132:139
Try to ping the other computers and verify that communication is working.

I noticed that the computer above appears to be on the Internet. A broadband router will normally block those ports since they aren't forwarded in the router. I don't recommend that you forward those ports through the router because of the security risk.

If you are trying to communicate with another LAN, through the Internet, you should probably use Virtual Private Networking and NOT attempt file sharing directly over the Internet.

There are three main parts to SAMBA (and Windows File Sharing). Only the first of these works between computers on different IP sub-networks.
  • SMB on TCP port 445 to list shares and access shared folders
  • NetBIOS name service on UDP port 137 (converts computer name to IP)
  • Network browse list on UDP port 138 (list of detected servers)

On the same IP sub-network SMB can also use TCP port 139 (NetBIOS session) but it is only used when communication fails through TCP port 445.

When I refer to a sub-network I mean two computers on the same Ethernet LAN that also have the same network address. The network mask determines how much of the IP address (on any particular computer) will be used for the network address. Computers with different network addresses are in a different sub-network even if they connect to the same Ethernet LAN. To use SAMBA with computers on a different sub-network you have to type in an IP address instead of a computer name, and the list of detected servers (browse list) will not show computers on other sub-networks.

SMB is what allows you to list the network shares on other computers and access shared folders, printers and files. SMB uses TCP port 445 to communicate with computers on other sub-networks. SMB can use TCP port 139 to communicate with computers on the same sub-network. SMB uses the IP address to access other computers so you have to provide some kind of "name service" in order to use computer names instead of IP addresses.

NetBIOS name service is what usually translates computer names to IP addresses within each sub-network. It uses broadcasts on UDP port 137. NetBIOS name service does not work between IP sub-networks. When you can't use NetBIOS name service you can type in IP addresses instead of computer names. You can also translate names in some other way as follows.
  • Add computer names and IP addresses to "hosts" file
  • Use a local DNS server (that you set up)
  • Use Windows Internet Name Service (WINS) on a server
  • Add computer names and IP addresses to "LMHOSTS" file

The computer name resolution is one of the most confusing things about SAMBA and Windows File Sharing because there are so many choices of how to do it. The only one that requires no user configuration is NetBIOS name service and that only works within the same sub-network.

The network browse service uses broadcasts on UDP port 138. It maintains a list of server computers detected on the same sub-network in the same work group. Computers that do not share folders or printers (server service disabled) will not show up in the list. The browse service is just a convenience and you can always enter a computer name manually or create a shortcut with the correct computer name. The fact that a computer name does or does not appear in the browse list tells you nothing about whether you can actually access the computer using SMB.

Because of the problems with NetBIOS name service and the browse list between sub-networks I recommend that you start by only typing in an IP address for another computer until you can list the shares on the other computer. You can "ping" the other computer using the IP address to verify that IP communication works. In order to list shares you may have to log on to the other computer using a valid user name and password. Computers can be configured to allow anonymous share listing but that can also be disabled.

If you're going to access computers on other sub-networks I recommend that you add the computer names to the "hosts" file. That's the simplest way to use computer names. You can use a DNS server provided that the computers can register their names with the DNS server. The DNS server for your Internet provider won't work since they don't let you register names. On Linux you can enable a WINS server in SAMBA to handle computer name resolution. You may still have to manually add the computer names for WINS to work, but you only add them on the WINS server computer. Only server versions of Windows have WINS server. The "LMHOSTS" file does name resolution similar to "hosts" but also has other options to control the browse service to span sub-networks.

When you're having trouble with SAMBA or Windows File Sharing keep the three main parts in mind, and remember that SMB is the most important one and only one required. The other two parts are nice but not absolutely required if you use IP addresses instead of computer names.
 
Old 08-28-2009, 03:41 AM   #3
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Original Poster
Rep: Reputation: 50
All three computer are connected to one router, 1 by cable and 2 by wireless, the ip address is 192.168.10.0/24.
One of the computers run Windows, in that I can see and manipulate the shared folders of the other two.
One of the computers run Slackare-current and the other Slackware64-current.
 
Old 08-28-2009, 08:13 AM   #4
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748Reputation: 2748
Quote:
timeout connecting to 67.215.65.132:445
timeout connecting to 67.215.65.132:139
Quote:
the ip address is 192.168.10.0/24.
This looks like a networking issue. Samba is trying to access computers on your external IP address.
Do you have a default gateway address of 192.168.10.1 in the output of /sbin/route?
Are your Slackware computers connecting by wireless?
How are you setting up the wireless connections?

@Erik_FL - Very nice description of Samba and networking!

Last edited by allend; 08-28-2009 at 08:15 AM.
 
Old 08-28-2009, 10:21 AM   #5
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by mlpa View Post
All three computer are connected to one router, 1 by cable and 2 by wireless, the ip address is 192.168.10.0/24.
One of the computers run Windows, in that I can see and manipulate the shared folders of the other two.
One of the computers run Slackare-current and the other Slackware64-current.
OK, let's focus on the symptoms of the problem.

Quote:
\\PEDRO-PC
timeout connecting to 67.215.65.132:445
timeout connecting to 67.215.65.132:139

\\DARKSTAR Samba 3.2.13
timeout connecting to 67.215.65.132:445
timeout connecting to 67.215.65.132:139
I read the man page for "smbtree" and it uses the network browse service to get the names of computers in the work group. It appears to have done that correctly since it displayed "PEDRO-PC" and "DARKSTAR". I'm assuming that "PEDRO-PC" is Windows since it shows no SAMBA version and "DARKSTAR" is Linux since it does show a SAMBA version.

Next "smbtree" tries to list shares on the computers. It is obviously using the wrong IP address to access the computers, and the other interesting thing is that it uses the same address for both computers. The problem is with name service. It is not converting the computer names to the correct IP addresses.

The simplest solution is to add the computer names to the "hosts" file with the correct LAN IP addresses.

TROUBLESHOOTING

Is there anything on the computer that might block UDP port 137? If NetBIOS name service doesn't work then computer names usually can't be resolved correctly.

Do you have a DNS server configured for the computer to use that is running "smbtree"? You can check that by looking at "/etc/resolv.conf". Is it the correct DNS server? Does that DNS server know the IP address of "PEDRO-PC" and "DARKSTAR"? Did you configure some other kind of server such as a WINS server for SAMBA to use? Do you have those two computer names listed in your "/etc/hosts" file? If the computers have incorrect IP addresses listed in the "hosts" file, the DNS server computer, or the WINS server then you will see this sort of problem.

If the two computer names are not found in any of the places I mentioned then SAMBA will try to use NetBIOS name service. In that case the computers "PEDRO-PC" and "DARKSTAR" will provide their IP address in response to a broadcast. I have run into this kind of problem on computers that have File and Printer Sharing enabled for more than one network interface (connection in Windows lingo). If you happen to have File and Printer Sharing enabled for a broadband interface/connection such as PPPoE or a directly connected broadband modem then NetBIOS name service on the computer may respond with that address instead of its LAN address. A VPN connection is another example where you might have problems.

To avoid the problem you have to disable File and Printer sharing on all the network interfaces (for "PEDRO-PC" and "DARKSTAR") except for the LAN. As an alternative you can add the two computers to the "hosts" file on PCs that will access "PEDRO-PC" and "DARKSTAR". You can also set up and configure a local DNS server and then make sure that the two computers actually register their names and LAN IP addresses with the DNS server.

I don't know a lot about NetBIOS name service in SAMBA/Linux. You may also be able to change the configuration for which interfaces or networks NetBIOS name service accesses. You want NetBIOS name service ONLY on the LAN interface.

Even though "smbtree" doesn't work, you should still be able to access the computers using the correct IP address instead of the computer name. You should also be able to "ping" the computers using the correct IP address.

One last thing did occur to me. If you have a network with a mixture of IPv4 and IPv6, try disabling IPv6. It's possible that you have NetBIOS name service problems due to having two different ways to communicate between computers.

Last edited by Erik_FL; 08-28-2009 at 10:24 AM.
 
1 members found this post helpful.
Old 08-28-2009, 04:30 PM   #6
mlpa
Member
 
Registered: May 2008
Location: Aveiro
Distribution: Slackware
Posts: 542

Original Poster
Rep: Reputation: 50
I don't have any firewall, just IPTables, but I don't touch it, when I do cat /etc/resolv.conf I get:
Quote:
sudo cat /etc/resolv.conf
# Generated by dhcpcd for interface eth0
nameserver 192.168.10.1
All the computers are connected to the same sub network, in this case, 192.168.10.0/24

I only use IPv4, and all computers are connect to one D-link router, one slackware by cable, one slackware by wireless and one windows by wireless.

The windows computers can see and manipulate the shared folders of the network, my smb.conf file is correct?
I use the recommend by thunar-shares-plugin.
 
Old 08-28-2009, 07:07 PM   #7
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
This is a strange problem. The only thing that I can suggest is to add the two computers to the "hosts" file because the name service is not working properly. What makes no sense at all to me is the attempt to communicate with 67.215.65.132. Perhaps that was somehow cached from a previous configuration or is defined for those computers in "hosts". Have you rebooted the computer since the last time you made any configuration changes to the computers?

I do recommend that you look at the IPTables configuration because it normally does not work with SAMBA unless you configure it. You might even want to try disabling IPTables temporarily to see if that corrects the problem. If it does solve the problem then the IPTables configuration is not allowing communication for some of the required ports (UDP 137, UDP 138, TCP 139, TCP 445).

I have used SAMA quite a few times on Slackware Linux but I've never tried to use it with IPTables. There are some threads that discuss IPTables and SAMBA so you may want to look at those to see if they relate to the problem.
 
Old 08-28-2009, 07:33 PM   #8
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
He's using opendns

What is likely happening is that he's getting a "localdomain" added to his dns query or instead of NXDOMAIN he gets redirected by opendns to hit-nxdomain.opendns.com.
 
Old 08-28-2009, 08:42 PM   #9
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Quote:
Originally Posted by mRgOBLIN View Post
He's using opendns

What is likely happening is that he's getting a "localdomain" added to his dns query or instead of NXDOMAIN he gets redirected by opendns to hit-nxdomain.opendns.com.
I'll keep that in mind for future problems. I really know more about Windows than Linux but I'm slowly learning. SAMBA is awesome. I've started using it instead of Windows Vista because Vista's new SMB service tends to go out to lunch under heavy use. After I got tired of rebooting Vista I just started booting Linux instead when I need to do some serious file transferring.

I'm balking at spending another $200 to $220 for an upgrade to Windows 7. It's kind of pointless for me because I have to do all my software development with XP. The applications I maintain haven't been rewritten for Windows Vista and later. Running XP in a virtual machine on Linux or Vista is about the same as running one on Windows 7. I have a feeling I'll be using KDE 4 rather than Windows 7 very soon.
 
Old 08-28-2009, 08:52 PM   #10
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
Quote:
Originally Posted by Erik_FL View Post
I'll keep that in mind for future problems. I really know more about Windows than Linux but I'm slowly learning.
Judging by the quality of your posts here, you must know a lot about Windows then

Quote:
Originally Posted by Erik_FL View Post
I'm balking at spending another $200 to $220 for an upgrade to Windows 7. It's kind of pointless for me because I have to do all my software development with XP. The applications I maintain haven't been rewritten for Windows Vista and later. Running XP in a virtual machine on Linux or Vista is about the same as running one on Windows 7. I have a feeling I'll be using KDE 4 rather than Windows 7 very soon.
I hear that, couple of applications for things at work require Windows (PABX etc.).

Just give KDE4 a try for a month or so, Nothing to lose that way and if you find you don't like it you can always flip back to the "dark side".

Windows XP runs fine here in VirtualBox so it sounds like it would more than meet your needs.
 
  


Reply



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
How to install xfce 4.6 at /opt/xfce? josealexandre Linux - General 2 03-01-2009 12:31 PM
XFce and Compiz : xfce doesn't manage the desktop naaman Linux - Desktop 0 07-16-2008 01:39 AM
XFCE Network ServersI use XFCE (sometimes) but I can not find my network folders on a holzster Ubuntu 0 10-24-2006 05:48 PM
Xfce Samba from Run (smb://) Waqas Ahsan Linux - Software 1 09-28-2006 03:44 PM
Xfce problems with task bar and xfce-panel aeruzcar Linux - Software 4 06-26-2006 05:29 AM

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

All times are GMT -5. The time now is 06:24 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