Mounting Windows Share on Centos 7

Steps to permanently mount a windows share on CentOS 7:

  1. Create a share on Windows machine
  2. On the CentOS machine, edit the /etc/fstab and add the followin line:
//WinServerIPorHostname/shareName /mnt/win cifs user,uid=500,rw,suid,credentials=/root/secret.txt,domain=WinServerIPNameOrDomain 0 0

where /mnt/win is the mounting point, 
credentials=/root/secret.txt is the file where you store the crednetials. It has the following format: