Revisiting "Auto-mount persistent SMB shares" as it has been closed.
Zorin 64-bit OS 16.3
AMD® Ryzen 7 4700u with radeon graphics × 8
18G RAM
The reconnection of my SMB share has been working for over a year and no longer works. I changed nothing on the Zorin machine nor on the Windows share PC.
From the now-closed post above I tried several things:
I reran the command sudo apt install cifs-utils
I have a working shortcut in Gigolo but do not see how to get it to auto-run at startup. (Instructions say to enable an auto-connect flag but I see no way to do this.)
Most answers (and what eventually worked) have the fstab file and the smb.conf file setup for my environment but as I said, doesn't work anymore.
Below are the relevant fstab and smb.conf file lines, maybe someone can spot something?
Isn't there a way to add to the startup apps utility a command like:
smb://pcname.local/share/
Thanks all!
==========================
FSTAB:
UUID=ba1481b8-6324-4aaf-ace9-f44b3de1c096 / ext4 errors=remount-ro 0 1
#/boot/efi was on /dev/nvme0n1p1 during installation
UUID=9B4B-E346 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0 //192.168.10.107/plexyd /home/richieg/samba cifs credentials=/home/richieg/.smbcredentials,uid=richieg,gid=richieg 0 0
SMB.CONF:
#======================= Global Settings =======================
[global]
##Browsing/Identification ###
Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = LOVEBIRDS
client min protocol = NT1
server min protocol = NT1
Now the share does automount but with 2 weird twists...
I get 2 separate and identical SAMBA locations in my FILES' locations list,
The new SAMBA locations seem to be very much slower connections than if I manually mount the same share via
FILES > Other Locations > Connect to server > smb://server.local/share/
I would also like to auto mount my smb share at startup. I can do it on my pi4.
I can manually mount using the terminal with the same command I use on the pi but the line I use in the fstab on the pi does not work on Zorin.
I've also succeeded at accessing the folders through the files app and bookmarking them. At least I only have to open files and click on the bookmark to get the "network servers" shortcut to appear on the desktop.
Note: The shared folder on the windows pc has a space in the name. On the pi "\040" is used for the space. Is that correct for Zorin?
Logon to network folder using files app
smb://MSI-I9-11-2.local/Shared Media/
Manual mount in terminal
sudo mount -t cifs -o username=name,password=password "//192.168.77.104/Shared Media" /mnt/Media
Auto mount in fstab (this one not working)
//192.168.77.104/Shared\040Media/ /mnt/Media cifs username=name,password=password 0 0
I seem to remember having a similar issue with the PI because it was trying to mount network shares before making the wifi connection.
I'm going to boot up the PI4 and have a look at the fstab there, maybe I had to add something. Nope, I see nothing there but I'm betting this is the issue.
I know there's a way to make the system wait for the wifi to connect during boot, but I forgot how. I'm going to create a new post for this question.
It automounts the windows share when I open the folder, not when the system boots.
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=7e781b6e-de2e-45d4-96ca-74061209be9e / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=A415-20C6 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
# Mount HDD
/dev/disk/by-uuid/d8e5dd52-ea9a-46da-85ba-2b981945bb1d /mnt/d8e5dd52-ea9a-46da-85ba-2b981945bb1d auto nosuid,nodev,nofail,x-gvfs-show 0 0
#Mount Shared Media
//192.168.77.104/Shared\040Media /mnt/Media cifs username=Name,password=pass,x-systemd.automount 0 0