Windows to Linux LAN filesharing (SOLVED)

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

Re: Windows to Linux LAN filesharing

Postby pgmer6809 on Thu Apr 18, 2013 12:52 pm

TuftyDave wrote:Hi,

All the samba stuff is fine one copy of nmbd and three copies of smbd running.

You say:-
"Go to MENU => CONTROL CENTER => INTERNET and NETWORK"
Don't have that on my Linux. Could it be under a different name?

I found something that says it is "Personal File Sharing Preferences"
"Share Files over the Network"

But it also says:- "This feature cannot be enabled because the required packages are not installed on your system"
No hint of what those might be however! (subtle hint for Linux coders!)

Those would be the Samba Server packages. To read Windows shares on a remote windows machine you only need the samba client packages. To offer up Windows shares to other machines you need in addition the Samba Server packages.

1. What flavor of Linux are you running? What Desktop? On most MINTs Samba is enabled by default.
On my MATE MINT the Control Center has a Shared Folders Icon. On Ubuntu there was a similar function under the Preferences, or System Settings area. This is pretty standard, if you look you MUST be able to find this functionality. This will save you having to run the various arcane smbpasswd etc. cmds.

2. On your windows box, when you go to the 'browse network' feature (whatever that is on Win8 - they keep changing it) can you see your linux box?

Just because Windows can see address 192.168.0.102, does not mean that the Windows share software can see your linux box. To just see the IP address only requires a basic TCP/IP stack. For Explorer to see the host name requires a running smbd, and nmbd process on linux.
3. Windows typically does not care about upper or lower case. Linux does. When you create your user dave, try to give it the same case on the linux box as you have on the windows box. Std unix is for all user names to be lowercase, but if Windows is trying to log in to samba as "DAVE" and samba is expecting "dave", it wont work. Also make the passwords the same, at least until you have finished testing.

4. Go to your package manager, (Synaptic in MINT, or Ubuntu) and look for all the packages relating to samba. Install most of them. I don't know why you cant see the graphical configuration of samba from your control panel.

5. Some useful samba cmds that can run on your LINUX box. But I don't think these will help you since your problem seems to be that it is Windows that cannot connect to Linux, not the other way round. Anyway for future reference......
a)
Code: Select all
 sudo nmap -sS -sU -T4 192.168.0.100


Run it twice, once against the ip address of your current Ubuntu machine and again with the ip address of a machine you're trying to access.
You need to have at least these ports open for Samba/SMB to work:
139/tcp open netbios-ssn
445/tcp open microsoft-ds
137/udp open|filtered netbios-ns
138/udp open|filtered netbios-dgm

b)
Code: Select all
 nbtscan [-s :] 192.168.1.0/24
will scan the 255 address subnet and report hostname and ip address.
c) List public SMB shares with
Code: Select all
smbclient -L //server -U user


d) Connect to a SMB share with
Code: Select all
smbclient //server/share -U user
pgmer6809
Level 2
Level 2
 
Posts: 96
Joined: Sun Mar 04, 2012 9:06 pm

Linux Mint is funded by ads and donations.
 

Re: Windows to Linux LAN filesharing

Postby TuftyDave on Thu Apr 18, 2013 12:58 pm

Well this is turning into a Microsoft diagnostic session!

I've just tried the same thing on my XP laptop...

explorer \\192.168.100 happily opens shared files on Vista box TOSH (192.168.0.100)

explorer \\192.168.102 doesn't open the Linux box and DOES return an error "The path 192.168.0.102 does not exist or is not a directory"

so it's only Vista that defaults to the documents directory when it can't open the specified argument...
TuftyDave
Level 3
Level 3
 
Posts: 150
Joined: Tue Apr 09, 2013 6:29 am

Re: Windows to Linux LAN filesharing

Postby altair4 on Thu Apr 18, 2013 1:09 pm

TuftyDave wrote:explorer \\192.168.102 doesn't open the Linux box and DOES return an error "The path 192.168.0.102 does not exist or is not a directory"

so it's only Vista that defaults to the documents directory when it can't open the specified argument...

After my last post I booted into Win7 and it happens there as well ( don't spend much time in Win7 these days ). A curious response to not finding an ip address. The dilemma still remains though - there is no purer way for 2 machine to connect to each other than by ip address.

And remember folks, the samba client can access the samba server on the same box with a:
Code: Select all
nemo smb://192.168.0.102

smbd must be running, nmbd is irrelevant at this point, and the firewall is either disabled or allowing all samba ports.

EDIT: There is only one router in this network, right?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5926
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows to Linux LAN filesharing

Postby TuftyDave on Thu Apr 18, 2013 4:53 pm

No there are two routers in the network.
There's the main ADSL wireless router which is supplying wifi to the two windows lap tops (TOSH 192.168.0.100 and STEVEVAIO 192.168.0.108)
One of the cable ports from that router goes into another 4 port cable router (relay) and a cable port from that goes to the Linux box.
So the Linux box is cabled into the main ADSL wifi router, VIA a 4 port cable router acting as a relay.
TuftyDave
Level 3
Level 3
 
Posts: 150
Joined: Tue Apr 09, 2013 6:29 am

Re: Windows to Linux LAN filesharing

Postby altair4 on Thu Apr 18, 2013 6:24 pm

If by "relay" you mean switch then that should work.

I would make a suggestion however. Connect the Linux box into the same router with the Windows boxes and bypass the relay / switch.

EDIT: If for some reason you can't put all there machines on the same physical router is it possible to connect the Mint box and at least one of the windows boxes on one of the physical routers?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5926
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows to Linux LAN filesharing

Postby TuftyDave on Fri Apr 19, 2013 3:32 am

Hmmm...
That would be difficult.

I guess I could dismantle the Linux box and move it and one of the screens into the room with the main router in to do a few tests and then move it back.

When I set all this up, partly for security reasons, but also partly so there are were no addressing problems the devices are all mapped by MAC address to fixed IP addresses at the main router.
When a WIndows box on the LAN attempts to communicate with the Linux box (which is clearly KNOWN to WIndows as it shows DAVE-P5Q on MSHOME on the Windows network, so is there and active) what more would it ever need than an IP address which is definitely connected to the actual ethernet card in the Linux box?

It's never caused ANY problems in the past with any networking I've done, and I do have a third router (another wireless router) at the other end of a long corridor which is also fed from the same second router 'switch'. But I've not mentioned that as it isn't being used in the equation we are currently trying to sort. Again once I got it all set-up I've had no problems at all with the LAN and filesharing.
I have two ANDROID smart phones which I've introduced to the same network and again never had ANY problems with them finding all the devices and each other on the network.

I have no in depth knowledge of how IP addressing and DNS works, but I really fail to see how it would make any difference.
Though I guess the only way to be 100% certain is to move everything through into the other room and try it.

Will take me a while to set that up, it would be good to set up a sequence of commands to test once I do.
Might not be for a few days....
TuftyDave
Level 3
Level 3
 
Posts: 150
Joined: Tue Apr 09, 2013 6:29 am

Re: Windows to Linux LAN filesharing

Postby altair4 on Fri Apr 19, 2013 6:50 am

The reason I asked about the number of routers in the first place was to find a common cause of the bizarre symptoms you are experiencing not only in this thread but in your other thread.

If done the wrong way everything on the second router could have been placed in a different subnet from the first router and that would go a long way to explain your symptoms.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5926
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows to Linux LAN filesharing

Postby TuftyDave on Fri Apr 19, 2013 7:25 am

Yup, I see your reasoning.
I wish my memory was better, but I feel sure that when I ran a version of Ubuntu 18 months or so ago, there were no problems with LAN file sharing on exactly the same set-up.
I just can't be 100% certain though that I had tried eveything out, but I think I did.

I'm thinking a better way to do this is to get a couple of RJ45 adapters (female to female) and extent the cable so it comes straight from the main router to the Linux box.

I'll need to order those online & let you know when they arrive.
TuftyDave
Level 3
Level 3
 
Posts: 150
Joined: Tue Apr 09, 2013 6:29 am

Re: Windows to Linux LAN filesharing

Postby DisturbedDragon on Fri Apr 19, 2013 8:33 am

Not to seem unkind; routers, switches and access points are all very different devices with different functions. You need to be able to differentiate these devices and provide details as to their proper function (high level network map) on your network for any kind of reliable help. Help us help you.

Can you ping the Mint box from the Windows box?
Turn off firewall on both boxes for testing at least.
Does your router(s) NAT? Forward ports for SMB/NMBD.
Do you have SAMBA enabled on the mint box with users and shares configured?
Is SAMBA running on boot?
Are the routes properly configured on each system?
DisturbedDragon
Level 1
Level 1
 
Posts: 13
Joined: Mon Oct 29, 2012 6:29 pm

Re: Windows to Linux LAN filesharing

Postby TuftyDave on Fri Apr 19, 2013 1:27 pm

OK, firstly BIG apologies to pgmer6809
I've only just today seen your post! I must have added one of my own immediately after you posted and just not seen yours. So sorry...

OK, this is all getting quite complex now.

Apologies for not catching up with all answers to all questions, but some are repeats of already asked and answered questions and some are leading in directions I'm not sure are helpful at all.

Also 'DisturbedDragon' I find it difficult to respond to patronising comments in anything other than a defensive way. My understanding is that I came here to request help which I am most grateful for, so why on earth would I have any intent to hinder people from helping me! (bloody cheek!) I'm so sorry that I don't know every little detail about every piece of equipment I own and haven't memorised the technical specifications of all internet related equipment. The very reason I came here seeking help is BECAUSE I'm NOT an expert on routers & internet & Linux!

So, what seems to have been overlooked by me missing pgmer6809's reply, is that I don't seem to have Samba Server Packages running???

So I just looked at Synaptics Package Manager and it seems I do have Samba installed.

Does anyone know how I gain access to it to make sure it turns on at boot & so I can run the 'Personal File Sharing' program which seems to be 'waiting' for Samba?
TuftyDave
Level 3
Level 3
 
Posts: 150
Joined: Tue Apr 09, 2013 6:29 am

Re: Windows to Linux LAN filesharing

Postby altair4 on Fri Apr 19, 2013 1:49 pm

Does anyone know how I gain access to it to make sure it turns on at boot & so I can run the 'Personal File Sharing' program which seems to be 'waiting' for Samba?

"Personal File Sharing" ( PFS ) has nothing to do with Samba. Even with the missing packages installed PFS doesn't work very well with windows and it's designed to only share the Public folder in your home directory.

EDIT: If you are interested anyway these are the missing packages tp get Personal File Sharing enabled:
apache2.2-bin
libapache2-mod-dnssd

As in your other topic to find out if samba is running:
Code: Select all
sudo service smbd status
sudo service nmbd status

But remember you can access your own share so you aren't missing any samba packgaes, services must be running, your firewall is either disabled or allowing the samba services, you have already created a share, and you have already added a user to the samba password database.
TuftyDave wrote:OK, after updating smb with new user 'dave' I can now do 'nemo smb://192.168.0.102' and log onto the shared folders on my linux box but FROM MY LINUX. Still not able to do it from Windows box on the network.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5926
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows to Linux LAN filesharing

Postby TuftyDave on Fri Apr 19, 2013 2:25 pm

Yeah... I'll order the RJ45 couplers and get a cable straight to the Linux box, just in case it's the intermediate 'switch' that is somehow causing the problem.
I do appreciate all the help I get here. Thanks for being patient. :D
TuftyDave
Level 3
Level 3
 
Posts: 150
Joined: Tue Apr 09, 2013 6:29 am

Re: Windows to Linux LAN filesharing

Postby altair4 on Fri Apr 19, 2013 2:33 pm

Take a look at the physical connection between Router1 ( that your Windows machines are connected to ) and Router2 ( that your Mint box is connected to ).

If the cable is between a lan port of router1 and the wan port of router2 then everything connected to router2 is in a new subnet and that is not a good thing. It should be connected to a lan port of router2. The next thing we need to find out is if router2 can be used this way.

Can you post the make and model of router2?

EDIT: Seem to be having a minor medical emergency here so it might be a while for me to get back to you. Usually, all you have to do is disable the DHCP server function of your router after the right cable connection is made for this to work so you might want to check the manual that came with the router.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5926
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows to Linux LAN filesharing

Postby TuftyDave on Fri Apr 19, 2013 4:47 pm

Yeah, I did go through all this when I set it up.
You are correct I do NOT us the WAN port on the 2nd router
It is a Linksys BEFSR41 v2 EtherFast Cable/DSL Router with 10/100 4-Port Switch.
I'm using to pass internet connectivity to other devices.
It took me a while to get it working (this is probably two years ago now) but once I got it working I've had no problems at all with any networking and I'm fairly sure that inclued an Ubuntu version that ran on this same box which Linux Mint is on now.
TuftyDave
Level 3
Level 3
 
Posts: 150
Joined: Tue Apr 09, 2013 6:29 am

Re: Windows to Linux LAN filesharing

Postby TuftyDave on Fri Apr 19, 2013 5:07 pm

OK, another thing to try to home in on...
I did mention this right at the start and again later on, and it was mentioned in this thread:-
" Windows typically does not care about upper or lower case. Linux does. When you create your user dave, try to give it the same case on the linux box as you have on the windows box. Std unix is for all user names to be lowercase, but if Windows is trying to log in to samba as "DAVE" and samba is expecting "dave", it wont work. Also make the passwords the same, at least until you have finished testing."
(Thanks pgmer6809)

What windows sees and tries to connect to is "DAVE-P5Q"
My Linux box actually IS "dave-P5Q" (LOWER CASE 'DAVE')

I'm really not sure where Windows is getting the upper case from or how to force lower case.

If I put '\\dave-P5Q' into an explorer command line, it tries for a while, then it actually changes the command I typed in to '\\DAVE-P5Q' and says "Windows Cannot access \\DAVE-P5Q"
So it's not allowing the lower case 'dave'

(EDIT) Sorry I just realised pgmer6809 was referring to 'USER' not Machine name...
TuftyDave
Level 3
Level 3
 
Posts: 150
Joined: Tue Apr 09, 2013 6:29 am

Re: Windows to Linux LAN filesharing

Postby TuftyDave on Fri Apr 19, 2013 5:44 pm

OK, now this is getting weirder & weirder!!!
We MUST have done something to change things slightly...

Remember the 'nice' WIndows Vista error message when I tried to connect to 192.168.0.102 from the Vista Machines Explorer?
"Windows confirmed that "192.168.0.102" is currently online, but is not responding to connection attempts at this time.
This usually means that a firewall is running somewhere between the two computers and is blocking "World Wide Web service (HTTP)".
Windows has confirmed that Windows Firewall on this computer is correctly configured to allow this connection. However, a remote firewall might be blocking your connection.
If you have access to this firewall then configure the firewall to allow connections through TCP port 80. If you do not..... contact administrator.....
"

Well that has now changed to:
"Windows confirmed that "192.168.0.102" is currently online, but is not responding to connection attempts at this time.
This usually means that a firewall is running somewhere between the two computers and is blocking "File & Printer Sharing (SMB)".
Windows has confirmed that Windows Firewall on this computer is correctly configured to allow this connection. However, a remote firewall might be blocking your connection.
If you have access to this firewall then configure the firewall to allow connections through TCP port 445. If you do not..... contact administrator.....
"

So I double checked the Linux firewall and added an 'allow' for port 445

ufw status numbered
Status: active

To Action From
-- ------ ----
[ 1] 80 ALLOW IN Anywhere
[ 2] 445 ALLOW IN Anywhere
[ 3] 80 ALLOW IN Anywhere (v6)
[ 4] 445 ALLOW IN Anywhere (v6)

Still no change!
Maybe getting warmer though?
TuftyDave
Level 3
Level 3
 
Posts: 150
Joined: Tue Apr 09, 2013 6:29 am

Re: Windows to Linux LAN filesharing

Postby altair4 on Sat Apr 20, 2013 7:13 am

** Don't obsess about the host name and capitalization - you have static ip addresses on all your machines and are accessing them that way.

The http/smb/port 445 error message makes no sense.

If port 80 was closed you wouldn't be able to access the Internet with the Mint machine.
If port 445 was closed you wouldn't be able to access the Mint share from Mint itself.

** Turn off the Mint firewall to remove it from the discussion:
Code: Select all
sudo ufw disable


** That leaves the Windows firewall or something one of your routers is doing. Turn off the Windows firewall.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5926
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows to Linux LAN filesharing

Postby roblm on Sun Apr 21, 2013 12:05 pm

I did some testing with newly installed operating systems to see if I could uncover any information helpful to this situation. I wanted to see if a Vista system was more difficult to configure and operate on a network, since I have the least amount of experience with that operating system. I was able to get a copy of Vista and and do a new installation on a system. On my 4 computer wired network of 3 WinXP and Linux Mint Cinnamon systems, I replaced one of the WinXP systems with the Vista system. In windows explorer, when I clicked on Network, a message was displayed asking if I wanted to turn on Network Discovery and File Sharing, which I said yes. In the Network and Sharing Center I turned on "Public Folder Sharing" and turned off "Password Protected Sharing". The workgroup name was changed. The firewall was on by default and I did not change it. UAC was left on. Immediately the Vista system was able to see and have access to the shared folders on the other WinXP and Linux systems and vice versa.
On the Linux Mint system I did a fresh installation to a new partition on the same drive. I just changed the workgroup name and enabled a folder to be shared. The firewall setting was not changed. No other Samba packages had to be installed. Again this system was able to see and connect to the shared folders of the others computers and vice versa.
I also did a new Ubuntu installation to replace Mint, but here Samba had to be installed and then I got the same results.
So these tests seem to rule out any unusual configuration problems or lack of any installed software affecting this situation.
I know if I were in this situation that I would probably reset the main router and connect the WinXP and Linux computers to it with wired connections first. Then try to add Vista with a wireless connection. If the problem persisted, then I would do new installations on them. Too many changes have already been done. You can always do a backup image of the partitions.
Last edited by roblm on Sun Apr 21, 2013 6:54 pm, edited 1 time in total.
User avatar
roblm
Level 5
Level 5
 
Posts: 602
Joined: Sun Feb 24, 2013 2:41 pm

Re: Windows to Linux LAN filesharing

Postby TuftyDave on Sun Apr 21, 2013 5:13 pm

Sorry for 'obsessing'
The reason I was/am? is that initially when on WIndows Vista I click 'DAVE-P5Q' the error message I FIRST get (before diagnose) is:
Windows cannot access \\DAVE-P5Q
Check Spelling of the name, Otherwise there might be a problem with your network.
To try to identify and resolve network problems, click Diagnose.

Error Code 0x80070035 'The network path was not found'

When I click Diagnose, I get:-
"DAVE-P5Q" is not a valid host name
Check the spelling of the name, make sure the computer is turned on and connected to the network or contact your network administrator.

So I only get the message about it being there and active but not responding to requests when I use the IP address 192.168.0.102 to try to connect to it.

(I'll stop obsessing now!)
TuftyDave
Level 3
Level 3
 
Posts: 150
Joined: Tue Apr 09, 2013 6:29 am

Re: Windows to Linux LAN filesharing

Postby altair4 on Sun Apr 21, 2013 5:47 pm

The only reason I want to focus on using ip addresses only is:

(1) You have the luxury of using them since all your machines have static ip addresses.

(2) We don't have to spend a lot of time getting name resolution to work. There's a lot of stuff that needs to be checked out for that to work ( nmbd, name resolve order, basically everything in my HowTo )

(3) Once we get things set up so that access by ip address is accomplished we can go back if needed and make host name browsing work.

And the reason I originally suggested connecting the Mint machine to the same router as the 2 Windows machines is that when you combine this problem with the other one you posted it really does sound like a subnet problem: Machines in subnetB ( Mint ) can access machines in subnetA ( Windows machines ) but not the other way around. And that's only by ip address since browsing by name does not work across subnets.

Once everyone is on the same router we can see if everything magically works. If it does something is amiss with the 2nd router. Either way though it will simplify things. There are too many variables in this problem.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 15
Level 15
 
Posts: 5926
Joined: Tue Feb 03, 2009 10:27 am

Linux Mint is funded by ads and donations.
 
PreviousNext

Return to Newbie Questions

Who is online

Users browsing this forum: Mute Ant, Pierre and 28 guests