[UNSOLVED ABANDONED] File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

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 how to get help
Post Reply
taxedserf
Level 1
Level 1
Posts: 23
Joined: Fri Apr 06, 2018 5:54 pm
Location: England
Contact:

[UNSOLVED ABANDONED] File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

Post by taxedserf »

Help! I can't get Windows 10 and Linux Mint Xfce 18.3 to see eachother on the same network to share/sync files.

Environment and desired functionality:
  • Two laptops: one Win10x64 ("WIN"), one Linux Mint fce 18.3 Sylvia 64-bit ("MINT")
  • WIN is the primary machine, MINT is currently an experimental deployment of Linux Mint.
  • WIN is a member of workgroup "WORKGROUP" (the Windows default).
  • WIN's primary user has full admin rights.
  • MINT has one admin account (with full rights, including the use of sudo, and one user account, where test data sits (i.e. basic data hygiene).same wireless LAN, the usual domestic setting, 192.168.0.0/24
  • WIN has network set to "home", with network discovery and file sharing both switched on.
  • Desired functionality: WIN wants to run a file synchronisation utility, SyncBackFree, to sync files with corresponding folders on MINT. The data syncs from folders in WIN's primary user account to directories in MINT's non-admin user account.
Current situation;
  • WIN cannot see MINT in WIN's Windows Explorer > Network.
  • MINT cannot see WIN in Thunar's File Manager > Browse Network > Windows Network > error Failed to open Windows Network: no such file or directory.
  • No file sharing yet taking place!
Steps taken up to this point: (A) errors were:

Code: Select all

administrator@MINT ~ $ sudo service samba restart
Failed to restart samba.service: Unit samba.service is masked.

administrator@MINT ~ $ sudo gpasswd -a your-user-name fuse
gpasswd: group 'fuse' does not exist in /etc/group
No apparent hardware issues with MINT. This forum post was done on MINT on the same wireless network.

Time taken so far, including this forum post: 3.5 hours (far too long, far too complex!).

I'd be grateful for advice. What is the next step?
Last edited by taxedserf on Sun May 13, 2018 5:49 am, edited 1 time in total.
Martin the Taxed Serf, an English Accountant
https://fromwindowstolinuxmint.blogspot.co.uk/
altair4
Level 20
Level 20
Posts: 10396
Joined: Tue Feb 03, 2009 10:27 am

Re: File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

Post by altair4 »

In reverse order :

The reason samba.service is masked is because it doesn't exist in Linux Mint. You are referencing something written for Mint Debian many years ago. And don't worry about all that fuse stuff either.

In Mint run this command to find your exact host name:

Code: Select all

hostname
In Win10 invoke Run WinKey + r and enter that host name with a .local attached at the end like this for my Linux box named gort:

Code: Select all

\\gort.local
Windows is smart enough to launch Explorer and knows the protocol is smb.

You can do the same thing in reverse now that Windows has decided to play nice with macOS and Linux: Win10, Linux, mDNS, and Samba File Sharing

Then all you would have to do is run:

Code: Select all

thunar smb://win10-host-name.local
Here you have to tell it to launch thunar and what protocol to use.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
taxedserf
Level 1
Level 1
Posts: 23
Joined: Fri Apr 06, 2018 5:54 pm
Location: England
Contact:

Re: File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

Post by taxedserf »

No solution, I'm afraid. Long debug process follows.

In MINT:
administrator@GANDALF ~ $ hostname
GANDALF
In WIN:
In WIN's MS-DOS prompt:
C:\Users\WIN>tracert GANDALF.local
Unable to resolve target system name GANDALF.local.

C:\Users\WIN>tracert GANDALF
Unable to resolve target system name GANDALF.
In MINT:
administrator@GANDALF ~ $ ifconfig
enp5s0 Link encap:Ethernet HWaddr 70:5a:b6:dd:73:82
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:225 errors:0 dropped:0 overruns:0 frame:0
TX packets:225 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20994 (20.9 KB) TX bytes:20994 (20.9 KB)

wlp4s0 Link encap:Ethernet HWaddr f0:7b:cb:4f:32:43
inet addr:192.168.0.20 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a833:d940:cd67:6e7c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4656 errors:0 dropped:0 overruns:0 frame:1208
TX packets:3122 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4424472 (4.4 MB) TX bytes:359136 (359.1 KB)
Interrupt:17

In WIN:
C:\Users\WIN>ipconfig
Windows IP Configuration
[...]
Wireless LAN adapter WiFi:

Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::8134:cfd1:b02b:90bc%17
IPv4 Address. . . . . . . . . . . : 192.168.0.16
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.1

[...]
In MINT:
administrator@GANDALF ~ $ ping 192.168.0.16
PING 192.168.0.16 (192.168.0.16) 56(84) bytes of data.
64 bytes from 192.168.0.16: icmp_seq=1 ttl=128 time=4.07 ms
64 bytes from 192.168.0.16: icmp_seq=2 ttl=128 time=1.83 ms
64 bytes from 192.168.0.16: icmp_seq=3 ttl=128 time=2.79 ms
64 bytes from 192.168.0.16: icmp_seq=4 ttl=128 time=1.92 ms
64 bytes from 192.168.0.16: icmp_seq=5 ttl=128 time=2.79 ms
64 bytes from 192.168.0.16: icmp_seq=6 ttl=128 time=4.50 ms
64 bytes from 192.168.0.16: icmp_seq=7 ttl=128 time=4.84 ms
q64 bytes from 192.168.0.16: icmp_seq=8 ttl=128 time=1.82 ms
^C
--- 192.168.0.16 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7011ms
rtt min/avg/max/mdev = 1.822/3.075/4.844/1.159 ms
administrator@GANDALF ~ $
In WIN:
C:\Users\WIN>ping 192.168.0.20

Pinging 192.168.0.20 with 32 bytes of data:
Reply from 192.168.0.20: bytes=32 time=67ms TTL=64
Reply from 192.168.0.20: bytes=32 time=87ms TTL=64
Reply from 192.168.0.20: bytes=32 time=2ms TTL=64
Reply from 192.168.0.20: bytes=32 time=2ms TTL=64

Ping statistics for 192.168.0.20:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 87ms, Average = 39ms
In WIN:
  • Run "\\192.168.0.20.local", error, "Windows cannot access \\192.168.0.20.local" Code 0x80070035 The network path was not found.
  • Run "\\192.168.0.20", Long delay, then error, "Windows cannot access \\192.168.0.20" Code 0x80070035 The network path was not found.
  • Run "\\192.168.0.20\local", long delay, then error, "Windows cannot access \\192.168.0.20\local" Code 0x80070035 The network path was not found.
Regarding viewtopic.php?f=42&t=199907:
  • Part 1 does not work (this is, indeed, the problem!).
  • Part 2: WIN’s firewall already allows mDNS in both private and public networks (screenshot)
  • Part 3 ought to materialise, because both accounts in WIN and MINT are password-protected. The problem is that we don’t get this far.
From viewtopic.php?t=224391:
On MINT, the log files are:
administrator@GANDALF /var/log/samba $ ls
cores log.127.0.0.1 log.gandalf log.nmbd
log. log.192.168.0.16 log.legolas log.smbd
All of these log files are empty!


From https://tenbulls.co.uk/2017/04/18/samba_on_mint/
administrator@GANDALF ~ $ testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
server string = %h server (Samba, Ubuntu)
server role = standalone server
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
On MINT, there appear to be no shares.
administrator@GANDALF ~ $

administrator@GANDALF ~ $ sudo smbstatus
[sudo] password for administrator:

Samba version 4.3.11-Ubuntu
PID Username Group Machine Protocol Version
------------------------------------------------------------------------------

Service pid machine Connected at
-------------------------------------------------------

No locked files

administrator@GANDALF ~ $
But the (non-admin) user did share via the GUI as per viewtopic.php?f=197&t=88255. The folder set to share was nonadminuser@GANDALF ~/Documents.

Yet, the non-admin user gets no evidence that the share is active.
nonadminuser@GANDALF ~ $ smbstatus
smbstatus only works as root!
nonadminuser@GANDALF ~ $ sudo smbstatus
[sudo] password for nonadminuser:
Sorry, user nonadminuser is not allowed to execute '/usr/bin/smbstatus' as root on GANDALF.
nonadminuser@GANDALF ~ $ smbtree
Enter nonadminuser's password:
nonadminuser@GANDALF ~ $
Back full circle!

Per https://community.linuxmint.com/tutorial/view/1937 (for an older version of Linux Mint):
administrator@GANDALF ~ $ cat /etc/group | grep samba
Sambashare: x: 130:administrator,martin (without spaces, lest we get some emoticon thing!).
administrator@GANDALF ~ $ cat /etc/group | grep smb
administrator@GANDALF ~ $
What is the next step?

This post entry, including documentation, 2.5 hours.
Martin the Taxed Serf, an English Accountant
https://fromwindowstolinuxmint.blogspot.co.uk/
altair4
Level 20
Level 20
Posts: 10396
Joined: Tue Feb 03, 2009 10:27 am

Re: File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

Post by altair4 »

[1] Your smb.conf looks fine.

[2] The reason you have no share definitions listed in testparm is because usershares places them somewhere else. To see them run this command:

Code: Select all

net usershare info --long
[3] Not sure if avahi in Mint is broken or not since you did not run ping gandalf.local in windows.

[4] The biggie is this one:
C:\Users\WIN>ping 192.168.0.20

Pinging 192.168.0.20 with 32 bytes of data:
Reply from 192.168.0.20: bytes=32 time=67ms TTL=64
That's good. Note: the other pings you made are syntactically incorrect.
Run "\\192.168.0.20", Long delay, then error, "Windows cannot access \\192.168.0.20" Code 0x80070035 The network path was not found.
That's bad.

I can not reproduce your error. Well ... I mean ... I can reproduce it fast enough by disabling smbd from running:

Code: Select all

sudo service smbd stop
DisableSMBD.png
But I can restore it fast enough by starting it again:

Code: Select all

sudo service smbd start
Attachments
EnableSMBD.png
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
taxedserf
Level 1
Level 1
Posts: 23
Joined: Fri Apr 06, 2018 5:54 pm
Location: England
Contact:

Re: File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

Post by taxedserf »

Debug as follows.

On MINT:

Code: Select all

administrator@GANDALF ~ $ net usershare info --long
info_fn: file /var/lib/samba/usershares/documents is not a well formed usershare file.
info_fn: Error was Path is not a directory.
info_fn: file /var/lib/samba/usershares/grive is not a well formed usershare file.
info_fn: Error was Path is not a directory.
administrator@GANDALF ~ $ 
Documents says (via administrator@GANDALF /var/lib/samba/usershares/ $ nano documents):

Code: Select all

#VERSION 2
path=/home/martin/Documents
comment=
usershare_acl=S-1-1-0:R
guest_ok=y
sharename=Documents
Grive says (via administrator@GANDALF /var/lib/samba/usershares/ $ nano grive):

Code: Select all

#VERSION 2
path=/home/martin/grive
comment=
usershare_acl=S-1-1-0:R
guest_ok=y
sharename=grive

On WIN:

Code: Select all

C:\Users\<user>>ping gandalf.local
Ping request could not find host gandalf.local. Please check the name and try again.

C:\Users\<user>>ping 192.168.0.20/local
Ping request could not find host 192.168.0.20/local. Please check the name and try again.
On MINT:

Code: Select all

administrator@GANDALF /var/lib/samba/usershares $ sudo service smbd stop/
On WIN:

Code: Select all

C:\Users\<user>>ping 192.168.0.20

Pinging 192.168.0.20 with 32 bytes of data:
Reply from 192.168.0.20: bytes=32 time=77ms TTL=64
Reply from 192.168.0.20: bytes=32 time=68ms TTL=64
Reply from 192.168.0.20: bytes=32 time=103ms TTL=64
Reply from 192.168.0.20: bytes=32 time=109ms TTL=64

Ping statistics for 192.168.0.20:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 68ms, Maximum = 109ms, Average = 89ms
On MINT:

Code: Select all

administrator@GANDALF /var/lib/samba/usershares $ sudo service smbd start
[this time, it did not ask for password]

On WIN:

Code: Select all

C:\Users\<user>>ping 192.168.0.20

Pinging 192.168.0.20 with 32 bytes of data:
Reply from 192.168.0.20: bytes=32 time=15ms TTL=64
Reply from 192.168.0.20: bytes=32 time=35ms TTL=64
Reply from 192.168.0.20: bytes=32 time=42ms TTL=64
Reply from 192.168.0.20: bytes=32 time=54ms TTL=64

Ping statistics for 192.168.0.20:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 15ms, Maximum = 54ms, Average = 36ms

C:\Users\<user>>ping 192.168.0.20/local
Ping request could not find host 192.168.0.20/local. Please check the name and try again.

C:\Users\<user>>ping gandalf.local
Ping request could not find host gandalf.local. Please check the name and try again.

C:\Users\<user>>ping GANDALF.local
Ping request could not find host GANDALF.local. Please check the name and try again.
Time taken: 40 minutes.
Martin the Taxed Serf, an English Accountant
https://fromwindowstolinuxmint.blogspot.co.uk/
altair4
Level 20
Level 20
Posts: 10396
Joined: Tue Feb 03, 2009 10:27 am

Re: File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

Post by altair4 »

In my attempt to try to reproduce your now multiple symptoms I ended up with such a mess that I had to reinstall - it's a test box so it's no big deal.

So I reinstalled and followed these steps post install:

** Did an update.
** Installed the samba package.
** Created a Thunar Custom Action to enable me to create a usershare of my Public folder through Thunar.
** From Win10 I connected to the Mint box three different ways:
\\mint-host-name.local
\\mint-ip-address
And finally - and this was last minute - through Network in Explorer.
** smbstatus confirmed the access in each case.

What I did not do:

** Did not enable ufw.
** Did not encrypt my home directory.
** Since there is only one user did not make an non-administer user since in a sudo based system it makes no sense.

The only Win10 systems I have are Win10 Pro but I don't think that would make a difference.

Time taken: 9 minutes - not including the install and update time.
It would have taken a bit less but let's face it the "net usershare add ..." syntax is not at all intuitive and I had to look it up.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
vansloneker
Level 5
Level 5
Posts: 585
Joined: Sat Mar 17, 2018 6:10 am

Re: File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

Post by vansloneker »

On my network it's important to first boot the Windows machine, and when it's up only then the Linux machine.
Unless stated otherwise Mint 18.3-64 XFCE
taxedserf
Level 1
Level 1
Posts: 23
Joined: Fri Apr 06, 2018 5:54 pm
Location: England
Contact:

Re: File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

Post by taxedserf »

Many thanks for your support, especially altair4 who went to the point of re-engineering problems to need a fresh re-installation!

I shall abandon this part of my project for now.

I wonder whether this particular incident has something to do with Microsoft quietly smuggling protocol SMB1 out as a default option of Samba on Windows 10 (ostensibly because of WannaCry), while the Samba community have either yet to realise what WannaCry means, or can't see the nexus between WannaCry or SMB1. Ref Doug Rathbone (or here).
Martin the Taxed Serf, an English Accountant
https://fromwindowstolinuxmint.blogspot.co.uk/
altair4
Level 20
Level 20
Posts: 10396
Joined: Tue Feb 03, 2009 10:27 am

Re: [UNSOLVED ABANDONED] File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

Post by altair4 »

I wonder whether this particular incident has something to do with Microsoft quietly smuggling protocol SMB1 out as a default option of Samba on Windows 10
So far all we have talked about is Win10 accessing a Mint box. A Windows 10 client will access a modern Linux Samba server using the SMB3 protocol dialect so that is not an issue:
testparm -sv | grep "server max protocol"
...
...
server max protocol = SMB3
It is true that Mint today can not access any server that has disabled SMB1. At least not though the file manager by default. Ubuntu 18.04 fixes that but it comes at a price. You can force the samba client on Mint to act like Ubuntu 18.04 but it comes at the same price as it does with Ubuntu as I explained here: Samba Without SMB1
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
User avatar
LinWinux
Level 4
Level 4
Posts: 309
Joined: Fri Aug 30, 2013 9:04 pm
Location: East Coast

Re: [UNSOLVED ABANDONED] File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

Post by LinWinux »

Excuse my ignorance, but if both computers are on the same network, then why not just use ssh or sftp from within Thunar in order to gain direct access to the Windows machine? That's what we do in our office with 4 machines on 2 different levels of the building. Just install open-ssh client and openssh-server from within synaptic, and that's all you need. In Thunar all you need to do is enter the IP of the machine to access. THen you'll be prompted for the user name and password of the remote machine, and that's it. You'll even have the opportunity to create a bookmark and to save the password.

However, you can't access the Mint machine from Windows because Windows won't permit you to goof around in file systems that aren't proprietary to Windows. BTW, you know of course that Windows10 is nothing more than fancy MS spy-software which can track every mouse click and every keyboard tap, whether you like it or not? You'd have to put a gun to my head, to get me to install something that insecure and privacy invading. Can't even turn off some of the privacy/security functions because MS keeps them hidden out of sight. Just saying ... :wink:

.
PLEASE ... Don't respond to questions with meaningless or thoughtless comments!
PLEASE ... Help others, don't be lazy! Take a moment to mark your post SOLVED if you received a solution.
valeriancafe
Level 1
Level 1
Posts: 7
Joined: Wed Dec 17, 2014 10:12 am

Re: [UNSOLVED ABANDONED] File sharing between Win10x64 and Linux Mint Xfce 18.3 Sylvia 64-bit

Post by valeriancafe »

I hope this will help other people I have been trying to log in from Linux mint to windows 10 for a while now.
1 st thing i did was Google the hell out of this

1) install samba

2) Linux windows 10 credentials

>> sudo useradd username@outlook.com
>> sudo passwd username@outlook.com
>> sudo usermod -G users username@outlook.com [the group users is configured in Samba as valid access group]
>> sudo reboot

windows 10 home version 10.0.17763 build 17763

in windows file explorer in can see my Linux mint laptop

3) install open ssh server and client for windows 10 from Settings / Apps / Manage optional features / add a feature

in Linux mint I can ssh to windows 10

So windows 10 (samba) --> Linux

and Linux (open ssh) --> Windows

All GUI

this worked for me Feb/2/2019
Post Reply

Return to “Newbie Questions”