Mounting SMB shares with no credentials
- Install required packages:
sudo apt install cifs-utils - Create folder to mount
sudo mkdir /media/plex- Mount SMB share with non-credential access:
sudo mount -t cifs -o rw,vers=3.0,guest //192.168.1.5/share /media/plex- Remount on system reboot
sudo vi /etc/fstab Enter the below value at the end of the line:
//192.168.1.5/share /media/plex cifs username=guest,password=,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=1 0 0Mounting SMB shares with credentials
Follow steps 1 and 2 from above.
- Create credential file
vi /root/.mysmbcreds Enter values as shown in the below example:
username=johnsmith
password=mysupersecretpassword- Mount SMB share with credentials:
sudo mount -t cifs -o rw,vers=3.0,credentials=/root/.mysmbcreds //192.168.1.5/share /media/plex - Remount on system reboot
sudo vi /etc/fstab Enter the below value at the end of the line:
//192.168.1.5/share /media/plex cifs credentials=/root/.mysmbcreds,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=1 0 0

