SMBNetFS is a user land smbclient that is used to mount Windows network shares (cifs/smb) to a Linux file system on demand. Unlike the mount command smbnetfs doew not require root privilege
An smbnetfs package is available within most of the mainstream distro repositories.
See attached document for set up instructions.
smbnetfs configuration files are located in a hidden folder within the user home folder
cp /etc/smbnetfs.conf ~/.smb/.
An authenticaiton file can be usef to automatically forward usernames and passwords
Setting up smbnetfs
SMB directories in Thunar can be opened in the same way as described for SFTP. If you do not use this often, then no difficulties usually arise. Otherwise, it may be more convenient to use the smbnetfs package, which is based on the FUSE subsystem. An additional bonus is that ordinary programs that do not know about the existence of GVFS will be able to work with network folders.
Install the smbnetfs package:
# apt-get install smbnetfs
Let's add the user who will use the package to the fuse group:
# usermod -aG fuse stupin
In the user's home directory, create a directory with settings:
$mkdir.smb
And in it there is a config for connecting to servers ~/.smb/smbnetfs.conf, containing credentials for connecting to network directories.
You can specify, using a forward slash, the server and directory for which specific credentials should be used as follows:
auth "SERVER/SHARE" "username" "password"
Instead of a server with a directory, you can specify only the server name or only the workgroup name, like this:
auth "SERVER" "username" "password"
auth "WORKGROUP" "username" "password"
For all other connections, you can only set a name and password:
Don't forget to make the settings file accessible only to the owner:
$ chmod go= ~/.smb/smbnetfs.conf
Now all that remains is to create a directory into which the network content will be displayed, and mount the SMB network view into it.
$ mkdir ~/smb
$ smbnetfs -o direct_io,readdir_ino ~/smb
To automatically mount the network when you log into XFCE, you can enter the following command into autorun:
/usr/bin/smbnetfs -o direct_io,readdir_ino /home/stupin/smb
Open "Sessions and startup" in the XFCE settings: Go to the "Autostart applications" tab, add a new element (on the page): Enter the autostart command and explanatory text: Mark this element as active: Now, immediately after logging in with your account, you can log into smb directory and see the contents of the network. At the first level of the hierarchy there will be workgroups, then servers, then shared directories, and then directories and files inside the shared folder. For example, a snapshot of the Thunar window: