Mount CIFS/SMB-Share static

This quick guide shows how to mount a CIFS/SMB-Share across over reboots on Debian-based installations.

1. Install the package cifs-utils:

sudo apt install cifs-utils

2. Append this to your /etc/fstab file:

//<path-to-share> <path-to-mountpoint> cifs credentials=/root/smbcredentials,uid=1000 0 0

3. Store your login credentials under /root/smbcredentials, therefore create this file and insert this:

user=<username> password=<password>

4. Mount your share manually or reboot your system:

sudo mount -a

Now your share will be mounted across reboots!