Samba - Fstab

Install cifs-utils:

sudo apt install cifs-utils

Create mountpoints:

mkdir /shares/downloads

Create a credentials file:

vim /home/tim/.smb


With contents like this

user=tim

password=mySecretPassword

domain=myDomain


Secure file

chmod 0600 /home/tim/.smb

Edit /etc/fstab:

//fs/tim /shares/tim cifs uid=tim,gid=timmy,credentials=/home/tim/.smb,iocharset=utf8,noperm 0 0 

Manually mount the share for testing:

sudo mount -av


https://timlehr.com/2018/01/auto-mount-samba-cifs-shares-via-fstab-on-linux/index.html

https://askubuntu.com/questions/157128/proper-fstab-entry-to-mount-a-samba-share-on-boot