SMB mounts

Update

SMB support is now mainstream e.g. https://libreelec.wiki/how_to/mount_network_share


Update on SMB mounts

I was asked how users of Linux can access and update files on a Windows share or NAS that uses Windows compatible shares (like HP Printers,Synology, Seagate Central etc)


First, install the needed client software

sudo apt-get install cifs-utils


edit the fstab sudo nano /etc/fstab

The add a line at the end of the file - all on one line

//192.168.0.100/SHARE /media/ZTTshare cifs rw,username=share,password=share,file_mode=0777,dir_mode=0777 0 0


//192.168.0.130/poco/recordings /media/windowsshare/ cifs rw,username=me,password=secret,vers=1.0,file_mode=0777,dir_mode=0777 0 0


The second example is for SMB 1 you can change that to SMB 2x 3x etc. 

Issue the command mount -a to reprocess fstab. I've used the IP address of the windows server but you can use the servername, that's why we installed WinBind. If you are using IP address r have a minimal install say on a single board computer you can the command above:  sudo apt-get install libnss-winbind winbind

Now, this mount will be activated whenever the machine boots. If you run into issues with dropped connection after a long period you can add a mount -a into a cron job like this
https://github.com/frownbreaker/FeedTransmissionExtras/blob/master/checknas/checknas.sh