This is a modified version of what PiMyLifeUp originally wrote here: https://pimylifeup.com/raspberry-pi-samba/