Ethan Copping

Home Contact Donate

How to Auto Mount CIFS/Samba Shares Linux Ubuntu on Boot

16, July 2022

Today we'll look at how to quickly and easily set up an Auto Mounted network share from your CIFS/Samba network share.

I'm personally using TrueNAS as my main storage solution, with the Windows Shares (SMB) option. This should virtually be the same process whether you're using a dedicated Hardware NAS like Synology or Software NAS like the built-in Windows File Sharing.

sudo apt install cifs-utils

sudo nano /etc/netshare-creds


sudo chown root: /etc/netshare-creds

sudo chmod 600 /etc/netshare-creds

sudo mkdir /mnt/ShareName

sudo nano /etc/fstab

//ShareIP/ShareName /mnt/ShareName cifs credentials=/etc/netshare-creds,file_mode=0755,dir_mode=0755 0 0

sudo mount /mnt/ShareName

© 2022