Typically, when I would like to keep a copy of the original file for such occasions, I will just make a copy of the file in the same directory. For example, using the samba configuration file:
sudo cp smb.conf smb.orig
Assuming you are running that command from inside the directory where the samba configuration file is located. It’s probably not a bad idea to get in the habit of using full paths so it wont matter as much where you are in the file structure:
sudo cp /etc/samba/smb.conf /etc/samba/smb.orig
However, to answer your question more directly, there is not an easy way that I am aware of. You could probably google for smb.conf and come up with something.
I had similar samba permission problems, on the Mac.
I used the manual in the BRUH video, changed the folder to the .homeassistant folder, did not make a pi user, since I already had a pi user from my manual HA installation on the RPi.
I restarted samba service and logged in on my iMac with user pi and password of the pi user. I could mount both volumes and edit, create and delete. Beautiful. No more silly copy/paste in nano. I use textwrangler on the Mac now.
For full folder permissions you may want to remove the 0775 lines in the smb.conf that you added last since they supersede the 0777 lines.