Setting up password authentication for windows file sharing / samba (smb / cifs ) shares

Adding password based authentication to windows file shares / samba sharing on linux is never as simple as I'd expect. With the spread of cryptolocker (ransomware which can encrypt your network shares!)  I have been working to enhance the security and resilience of my windows samba network shares. Here are some simple pointers from my experience of setting up authentication on a Ubuntu machine running samba (tested on samba versions 3.4.7 and 3.6.3) :

Check integrity of file / folder transfer - recursive md5sum checksums

How to check that directories of copied files retain their integrity on linux. I use this command to check my photographs from my digital SLR SD / CF cards retain their integrity when copied to my PC. Read on... 

SSH from Linux CLI

The following is a basic command for verbose ssh with a private key to a ssh server running on a custom post:

ssh -v user@domain -p $port -i "/private/key/file/path"