Auto mount a CIFS share on Linux in fstab

/etc/fstab
//<hostname>/<share>  /<mountpoint>   cifs w,auto,credentials=/root/secret.txt 0 0

/root/secret.txt
username=<username>
password=<password>

Leave a Comment