how to connect a samba shared drive in Linux Mint

Discuss new features and functions
Posts: 16
Joined: 7 Mar 2019

petevickerstaff

I've been struggling with this for several days, I was unable to find any definitive answer on the web. I finally managed to do it yesterday so I thought I'd share how I did it. It's basically down to mounting the share as a named drive, so here are the steps....

1. create a folder to mount the share in /mnt - either open /mnt as root and add the new folder or type
sudo mkdir /mnt/newfoldername
in a terminal window.

2. edit the fstab file, either open the /etc folder as root and double click on the fstab file or type
sudo xed /etc/fstab
in a terminal window, replace xed with the editor you may use. Then add the following line...
//192.168.2.1/volume(sda1)/ /mnt/Toshiba  cifs rw,nofail,x-gvfs-show,uid=1000,gid=1000,guest,users,vers=1.0  0  0
Replace 192.168.2.1 with the ip address of where your drive resides, replace volume(sda1) with the name of the networked drive, replace Toshiba with the name of the folder you created in /mnt in step 1. Check your gid and uid by typing
id -u username
and
id -g username
in a terminal window, replace if necessary, but they'll probably both be 1000, replace username with your own username.

3. Save the fstab file and close down the editor, as soon as you've done that the named drive should appear under Network in Nemo.

And that's it, the named drive will have your username permissions, so you won't have to bother with passwords.
To use the new named folder in FreeFileSync, simply browse to the folder like you would any other local drive.
Posts: 306
Joined: 7 Jan 2018

bgstack15

Thank you for sharing! Yes, this will make the network mount act like part of the local filesystem (akin to mounting a network share as Z:\, for example) so FreeFileSync and other programs can get to the files. Very few programs have all the Samba parts bundled inside to handle smb:// protocol natively.
User avatar
Site Admin
Posts: 7050
Joined: 9 Dec 2007

Zenju

I've been struggling with this for several days, I was unable to find any definitive answer on the web. petevickerstaff, 11 Feb 2020, 11:50
On some Linux systems (sometimes even depending on the version number, e.g. Ubuntu), Samba shares just work out of the box, via the magic of "GIO", on other systems you have to mount manually.

Unfortunately there was a bug in recent FFS versions (fixed in FreeFileSync 10.20!) that broke GIO and made it impossible to get the system to mount devices like Samba, MTP, or FTP automatically:

viewtopic.php?t=6871