Autofs should work with basically any filesystem that linux can read, local or remote. You can follow most of the same instructions up top to mount CIFS (samba) shares, you would just need to modify step 1 as follows:
First, on the unraid machine, if you haven’t already created one, add a user that has access to the shares you want. Make sure you set a password for the user. It only needs to be read-only access for standard Plex usage.
Next, run sudo nano /etc/auto.master
. At the bottom, add the following:
/mnt/smb /etc/auto.smbdb --timeout=0 --browse
Temporarily disable the NFS automount by putting a hash tag in front of it
#/mnt/nfs /etc/auto.nfsdb --timeout=0 --browse
Save the file and close it.
Now, run sudo nano /etc/auto.smbdb
This will open a blank file. For every share you want to mount, add a line like the following:
tv -fstype=cifs,ro,credentials=/root/.smbpassword ://192.168.1.10/tv
You’ll notice it’s similar to the NFS method, with the IP and share name, but has a couple different options, mainly credentials=/root/.smbpassword
. The same rules as above apply, with case-sensitive folder names and options.
Once you have all the shares added, save and close the file.
Next, run sudo nano /root/.smbpassword
. This will open another blank file where you need to store the username and password for your samba shares. This file needs 2 lines in it:
username=mthrboard
password=MySecurePassword
As always, this is case-sensitive, and the syntax needs to be precise. No spaces before or after the equals sign, and no other lines in the file. Save the file and close your editor.
Because this file contains your password in plain text, next you want to make sure that only the root user can see it. Run sudo chmod 600 /root/.smbpassword
, which will change permissions on the file so only root can read it or write to it.
Once this is all done, you can proceed with the rest of the steps as written.