How to mount network shares with LMDS?

How to create unrestricted Windows share?

Create unrestricted share on Windows?

  • Right click on a folder you would like to share and choose Share with --> Specific people
  • From the dropdown menu select Everyone and click Add
  • Make sure that Everyone group has Read/Write Permission level selected
  • At the bottom click Share then Done
  • Right click on a folder again and choose Properties
  • Go to Sharing tab and select Advanced sharing
  • Tick the box Share this folder, give it a name (something with no spaces), click Permission button
  • Having Everyone group selected, give it Full Control by selecting a tick underneath Allow column
  • Ok, Ok and Close.
  • Open Control Panel and go to Network and Internet
  • Select Network and Sharing Center, on the left go to Change advanced sharing settings
  • Expand section called All Networks
  • Scroll down to the Password protected sharing, choose Turn off password protected sharing
  • Save Changes

How to mount unrestricted Windows share in LMDS?

Install SMB utilities:

sudo su
apt install cifs-utils

Create folder that system will use for mountpoint:

mkdir /mnt/winshare

Mount Windows share

mount -t cifs  //192.168.100.21/winshare /mnt/winshare

Test share:

cd /mnt/winshare/
ls -l
touch  test.txt
ls -l 

If you see your test file than it works you can read and write to your share

Mount it permanently so is back even after reboot of the Pi.

Edit /etc/fstab file

nano /etc/fstab

Add a record that will reference your situation

//[Your Windows IP]/[Windows share name] [Raspberry mount point] cifs,uid=1000 0 0

In my case it will be like this:

//192.168.100.21/winshare /mnt/winshare cifs,uid=1000 0 0

Mount it all.

mount -a

Create softlink between your share and folder i.e. the one that will hold movies for LMDS.

In my case it could be like this:

ln -s /mnt/winshare /home/pi/LMDS/media/movies

This way each time share data change I will see these changes inside /home/pi/LMDS/media/movies where this folder will be utilized by containers like Sonarr i.e.

How to mount NAS share in LMDS?

Install SMB utilities if you haven't already:

sudo su
apt-get install cifs-utils

Create folder that system will use for mappings:

mkdir /mnt/smbshare

If your share require authentication, create file that will hold username and password details required to access network share:

sudo nano  /root/smbpass

Put username and password details in to the file:

username=YourUsername
password=YourPassword

Change file permissions preventing unauthorized access:

sudo chmod 600 /root/smbpass

Edit /etc/fstab file and add mapping record:

sudo nano /etc/fstab
//NAS-IP/lmds /mnt/smbshare cifs iocharset=utf8,credentials=/root/smbpass,uid=1000 0 0

Save and exit.

Test fstab entry:

sudo mount -a

See if you can list what is inside your share now.

ls -l /mnt/smbshare

You should see a list of directories and files shared from the NAS. If you do great, if you don't more than likely your NAS is not allowing access for the user you created for this share.

Create softlink between your /mnt/smbshare and a folder i.e. which will hold movies for LMDS

In my case I will delete existing movies folder from inside ~/LMDS/media and instead will create a softlink with the new pointing it to my share like below:

ln -s /mnt/smbshare /home/pi/LMDS/media/movies

From now all containers that require access to movies folder will see your share and files in it.

Help me make LMDS better

With your support anything is possible