Can't access NAS from Rpi2

Happy that you have a solution. That’s the important part.

But should you be doing this? Is connecting a USB drive to a WAN router a good idea?
I’d argue NO. A large majority of routers have buggy code that doesn’t get fixed often, if ever. Some of those router firmware has been found to allow internet users access to the storage without proper credentials and usually without any encryption.

Further, these purpose built devices usually don’t have a current release of samba (the software that makes SMB/CIFS work). One vender was found to be using a samba version from 2002, full of all the bugs from then. Other vendors remove important parts of samba to get it working with smaller storage and RAM requirements. These break nearly universal access that samba provides.

Should we use CIFS at all?
A raspberry pi is a tiny Linux system. The native file sharing protocol for Linux systems is NFS. NFS is 20-30% more efficient than samba or other network sharing protocols. NFS supports native Unix permissions, which work the same whether we are local or remote. NFS has been around a VERY LONG TIME and is used world-wide on critical systems.

CIFS and NFS can be used to share files from the same location at the same time, if you like.
In general, I use CIFS/SMB from Windows only. OSX and Linux and Unix systems would use NFS on the LAN for access and either sftp or scp or sshfs for access to files from anywhere else in the world.

Just thought I’d add to the conversation. There is no wrong answer and whatever the decision is the best for that person’s specific situation. Security is an important consideration. Linux/Unix have tools to solve that fairly easily.

Oh … and if a file is being changed that you want to never change, check out the chattr command. It is possilbe to make a file read-only to prevent changes. You could also copy the version you want in after each reboot, only if it has changed - that would be up to you. Linux/Unix systems are highly, highly, configurable. Of course, that is a last choice. Prefer the built-in methods first, as all the posters above tried to help by doing.

IMHO.

1 Like

Thank you for adding to the conversation. I agree with you, in the future I’m planning to have a Linux Machine as a NAS Server for better performance and security and use the Raspberry pi to access the Linux Machine via NFS. I think that in the end it’s a better solution. Take care.

Regards.

Thanks. Reached a little bit further but not full.
Right now I have complete access to NAS but not the W7.

following @fzinken advice:

with the W7 file server I can see the shared file directories but I can’t see the videos inside them. :frowning:

https://paste.osmc.tv/ataruliqic

Old article ASUS Wireless router leaves USB Storage Devices vulnerable to remote attackers interesting. Whether anyone considers this a bug or not, is open to debate.

Many ASUS Routers have this feature available, including models: RT-N66U, RT-N56U, RT-N15U, RT-N65U, RT-AC66U, DSL-N55U and RT-N16.

There were many other known issues in 2017 too: https://www.bleepingcomputer.com/news/security/40-asus-rt-router-models-are-vulnerable-to-simple-hacks/ Those were patched in March. But by now, there are probably 40 more issues. This is a common issue with commercially sold routers. Price doesn’t seem to help. Apple, Google have had similar issues, so going high-priced doesn’t seem to help. The only solution is to use a routing platform that can be easily patched, from a team/company who makes updates weekly. That basically means running a BSD or Linux-based router based off on of the major distros.

There are many ways to setup a NAS. That is for a different forum. Perhaps moving your media streaming to the NAS would make more sense? Keep using OSMC on the Pis, but consider a different streaming protocol instead of using the shared storage methods for most of your content. NFS still has a place, but perhaps not as the default protocol for movies or tv stuff.

Just more stuff to think about.

1 Like

Thanks, interesting stuff. A lot of things to think about.

Regards.

Your W7 file server would reject SMB1 request so you are a bit between a rock and a hard place here.
What is the Max Protocol that you have configured in Kodi now?
But first you have not followed what I suggested!

I’ve tried with only those 4 lines… but didn’t work. so I came back to my previous 8 lines configuration and noticed that max protocol had a _ instead of a =
So I’ve tried:

And… IT WORKS… both NAS (with Freenas installed) and W7 desktop with files to be shared and viewed in the RPI2 with OSMC…
I’m not really sure how safe this configuration is… the real only important files are my family photos (but with copy in the cloud :smile: ) … no work in this home computers…

I hope that future OSMC updates doesn’t mess up this… :blush:

Thanks for your support.

Well is this in user.conf? I would recommend to set “client max protocol SMB3” why the gui (settings → services → smb client) and then have in user.conf
client lanman auth = yes lanman auth = yes client use spnego = no client ntlmv2 auth = no

should be same result and be future proof.

Yes.
user.conf

Than give it a try with my suggestion

Hi…
I needed to update a plugin via its zip file stored on a NAS.
OSMC can access this NAS where my movies are stored.

But when trying to access it through “update from zip file” choosing SMB network, OSMC can’t find it.

I do not have a user.conf in my SMB directory. Is that the reason of this issue ?

PS : I did this many times and never had problems upgrading this way.

Hi,

user.conf needs to be created manually, with the options suggested by fzinken; but I think at this time browsing for SMB isn’t working. You can either mount these shares via fstab or of your nas offers nfs, set the share up as nfs on the nas; and browse to it using kodi nfs.

Thanks Tom.

:cry:
wil it be one day?

Hi,

My understanding is this a kodi issue and is being looked in into. For now fstab mounted samba or browsing is working via nfs.

Thanks Tom.

Okey. Thanks a lot Tom.

Browsing is generally working (at least for me) it might not be working against SMB1 servers (which are also not anymore accessible from Windows 10 Clients)

@alexisuceta
@DavidUcles

We would like to review this issue once more to ensure we can maybe fix it more holistically.
To do that we first would need to figure out which exact setting made it work for you.
Would you be able to do some quick testing of changing values in user.conf and restarting mediacenter and then check if connection still works? The steps would be:
sudo systemctl stop mediacenter
nano /home/osmc/.kodi/.smb/user.conf
sudo systemctl start mediacenter

The lines in user.conf should be as follows (you can comment out the others with # so no need to delete them

  1. Test just one line
    client lanman auth = yes
  2. If first test not successfull try the two lines
    client lanman auth = yes
    client use spnego = no
  3. Only if that is not successfull added the third line
    client lanman auth = yes
    client use spnego = no
    client ntlmv2 auth = no

The line of lanman auth = yes would not be needed for any of our test as it doesn’t impact the client side. So you can just delete that as the first try.

Many thanks for your help.

Good Night, cool, I’ll do it and let you know. Take care.

Regards.

Hi @fzinken, I did the testing, the connection still works with the 2 lines of the point 2):

client lanman auth = yes
client use spnego = no

The other 2 lines were commented. Take care.

Regards.

Perfect, thanks for testing.
Did you also tried with single line of
client lanman auth = yes

That should still work