I have a samba shared drive that I use to keep files that are available to anyone on the network. This drive is mounted at boot on my computers. Here is the fstab file:
`# /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/sda7 during installation
UUID=8429aa44-e70e-4fc4-8547-cafde77d1404 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=4E93-0D75 /boot/efi vfat umask=0077 0 1
# swap was on /dev/sda8 during installation
UUID=f002a1ef-f3e3-4cf0-a832-b0f683895bd2 none swap sw 0 0
UUID=f002a1ef-f3e3-4cf0-a832-b0f683895bd2 none swap sw 0 0
//192.168.1.2/ext4tb /media/ext4tb cifs users,guest,iocharset=utf8,vers=1.0,sec=ntlm,user 0 0`
This used to work fine until I had to upgrade to 18.04 LTS for some other reason unrelated to this issue. Before reinstalling, I made sure I had a copy of fstab since it worked just fine.
But now, the shared drive no longer automounts at boot and I need to enter my credentials even if though access is open to all.
So it looks like fstab is being executed before your network stack is up. Here is one way to remedy that:
[1] Create a file at: /etc/network/if-up.d/fstab
[2] Add this to it:
[3] Make the file executable:
Anything placed in if-up.d will be executed only after the network it up and operational. THe "mount -a" directive will mount anything in fstab that isn't already mounted. So the next time you boot your shares should be mounted.
Get rid of
sec=ntlm
, at some point this option became invalid. I don't have a 16.04 system any more to check but I'm pretty sure that's your problem.