No network shares (with Windows)

Get help for specific problems
Posts: 2
Joined: 19 Apr 2019

Mishimainizu

I'm on MX Linux and Samba is working correctly (I can move files from Linux to Windows 10 without problems). But, when I try to select a Windows share folder on the right side pane (mirroring destination), the network is not available, that is, I cannot select the destination folder over the LAN.

Is there a particular setting to be able to share files and folders between Linux and Windows?

Thanks
Posts: 306
Joined: 7 Jan 2018

bgstack15

You say samba is working, which is a great start.
I dug around and you are probably using Thunar (xfce) on MX Linux, which does support remote locations.
FreeFileSync is probably going to need the SMB share mounted on the filesystem, which is another main way to use samba.
Are you comfortable mounting up your UNC (\\otherserver\directory\dir2\) as a regular Unix path?
Depending on the permissions model of MX Linux, you might need to open a root terminal or use sudo for the following commands.
Make a directory where you want to mount the network share. /net or /mnt tends to get these sub-directories but it could be anything. You could choose to use /home/Mishimainizu/net-drive or something else.
sudo mkdir -p /net/dir2
Mount the drive, without a username and password. This will probably fail, but it is the basic syntax and we'll add username and password options farther down.
sudo mount -v -t cifs //otherserver/directory/dir2 /net/dir2
So, most SMB shares use a username and password. So include the username on the command line. I recommend not including the password, because the mount command will prompt you for the password, which is safer than using the command line option for password.
sudo mount -t cifs -o username=Mishimainizu //otherserver/directory/dir2 /net/dir2
If you really want the password on the command so it doesn't prompt you, you can pass it as part of the value for the -o flag, by separating the options with commas.
sudo mount -t cifs -o username=Mishimainizu,password=VisibleToAnybodyRunningPs //otherserver/directory/dir2 /net/dir2
If your password has anything special like an exclamation point !, pound symbol #, or ampersand &, or quotes ' ", you will need to treat the password specially. Bash (the shell) will react to unprotected symbols in ways you won't expect.
Try putting your password in single quotes, or double quotes. Alternatively, you could "escape" the special characters with a backslash \ right before the special characters.
sudo mount -t cifs -o username=Mishi,password="MyPwi$C00l&stuff" //otherserver/directory/dir2
sudo mount -t cifs -o username=Mishi,password='Double"QuotesInPw' //otherserver/directory/dir2
sudo mount -t cifs -o username=Mishi,password=Protect\&The\!Specials //otherserver/directory/dir2
If the username and password don't work but you're certain you got them right, you might need a domain value. You would probably recognize the domain or workgroup name to use, if you have to log into the Windows 10 with an all-caps name with backslash and then your username. For example, "MYWORKGROUP\Mishi." If that doesn't look familiar, the domain name useful for samba is probably just the servername. My examples have all been using "otherserver."
So, the mount command would look like:
sudo mount -t cifs -o domain=OTHERSERVER,username=Mishi,password="SOMETHINGCREATIVE" //otherserver/directory/dir2 /net/dir2
You can use a credentials file, which is highly recommended for holding the username and password (and domain) but you can read its man page at your leisure.

Once you get the network share mounted to the filesystem, you can navigate to it in FreeFileSync like any other directory. Hope that answered your question!
Posts: 2
Joined: 19 Apr 2019

Mishimainizu

Many thanks for these detailed instructions. Incidentally, when I woke up this morning MX was behaving erratically and was rather unstable. So I decided to reinstall it, and after setting Samba and all the rest it's up and running again, and FreeFileSync now displays the network shares.

Your help was very informative anyway!