Can't access NAS from Rpi2

Hi, since the last update to the version 17.4 I can’t access my NAS server from my Raspberry Pi 2. My NAS Server is connected via USB to my ASUS Router(RT-N66U). I have the Samba Settings configured with a user/password; I did a test from my laptop (Version 17.3 using MacOS) and I can access the NAS Server with the user/password defined but not from the Rpi2 with the same user/password.

If I can configure the NAS in the Samba Settings to allow “Guest Login” I can access the NAS Server, but for security reasons I want to configure a user/password to access the NAS like before.

Regards.

Try lower SMB protocols in Settings - Services - SMB Client - Max Protocol

Hi, I lowered the SMB protocols to versions SMBv1 and SMBv2 and I have the same issue. The strange is that the problem is accessing the folders inside the NAS, I can get to the root directory but not any folders inside. See the print screen when it requests the username and password for any folder in the NAS.

Regards.

Than the problem musst be something else. Enable debug logging and upload the log files

Hi, see the error below that I was able to see in the kodi.log.

Regards.

08:21:16.415 T:1938813936 ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME:PASSWORD@192.
unix_err:‘d’ error : ‘Permission denied’
08:21:49.559 T:1682699248 ERROR: Previous line repeats 2 times.
08:21:49.559 T:1682699248 ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME@192.168.1.1/E
unix_err:‘d’ error : ‘Permission denied’
08:21:54.514 T:1959075840 ERROR: Previous line repeats 2 times.
08:21:54.514 T:1959075840 ERROR: GetDirectory - Error getting smb://USERNAME:PASSWORD@192.168.1.1/Entertainment/
08:21:54.514 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://USERNAME:PASSWORD@192.168.1.1/Entertainmen
08:22:15.144 T:1709175792 ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME:PASSWORD@RT-N
unix_err:‘d’ error : ‘Permission denied’
08:22:23.414 T:1959075840 ERROR: GetDirectory - Error getting smb://RT-N66U-7198/Entertainment/
08:22:23.415 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://RT-N66U-7198/Entertainment/) failed
08:22:24.527 T:1959075840 ERROR: GetDirectory - Error getting smb://
08:22:24.527 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://) failed
08:22:25.568 T:1959075840 ERROR: GetDirectory - Error getting smb://
08:22:25.568 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://) failed
08:22:26.993 T:1959075840 ERROR: GetDirectory - Error getting smb://
08:22:26.993 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://) failed
08:23:33.045 T:1579676656 NOTICE: ES: Client from ::ffff:192.168.1.8 timed out
08:23:58.618 T:1959075840 NOTICE: Samba is idle. Closing the remaining connections
08:25:34.728 T:1579676656 NOTICE: ES: Client from ::ffff:192.168.1.8 timed out
08:29:04.071 T:1938813936 ERROR: SMBDirectory->GetDirectory: Unable to open directory : ‘smb://USERNAME@192.168.1.1/’
unix_err:‘6f’ error : ‘Connection refused’
08:29:05.448 T:1959075840 ERROR: GetDirectory - Error getting smb://USERNAME:PASSWORD@192.168.1.1/
08:29:05.448 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://USERNAME:PASSWORD@192.168.1.1/) failed
08:29:06.491 T:1938813936 ERROR: SMBDirectory->GetDirectory: Unable to open directory : ‘smb://USERNAME@192.168.1.1/’
unix_err:‘6f’ error : ‘Connection refused’
08:29:08.832 T:1959075840 ERROR: GetDirectory - Error getting smb://USERNAME:PASSWORD@192.168.1.1/
08:29:08.832 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://USERNAME:PASSWORD@192.168.1.1/) failed
08:29:09.610 T:1938813936 ERROR: SMBDirectory->GetDirectory: Unable to open directory : ‘smb://USERNAME@192.168.1.1/’
unix_err:‘6f’ error : ‘Connection refused’
08:29:10.715 T:1959075840 ERROR: GetDirectory - Error getting smb://USERNAME:PASSWORD@192.168.1.1/
08:29:10.715 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://USERNAME:PASSWORD@192.168.1.1/) failed
08:29:15.474 T:1938813936 ERROR: SMBDirectory->GetDirectory: Unable to open directory : ‘smb://’
unix_err:‘2’ error : ‘No such file or directory’
08:29:16.786 T:1959075840 ERROR: GetDirectory - Error getting smb://
08:29:16.786 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://) failed
08:29:17.905 T:1938813936 ERROR: SMBDirectory->GetDirectory: Unable to open directory : ‘smb://USERNAME@192.168.1.1/’
unix_err:‘6f’ error : ‘Connection refused’
08:29:19.098 T:1959075840 ERROR: GetDirectory - Error getting smb://USERNAME:PASSWORD@192.168.1.1/
08:29:19.099 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://USERNAME:PASSWORD@192.168.1.1/) failed
08:29:24.325 T:1938813936 ERROR: SMBDirectory->GetDirectory: Unable to open directory : ‘smb://USERNAME@192.168.1.1/’
unix_err:‘6f’ error : ‘Connection refused’
08:29:25.898 T:1959075840 ERROR: GetDirectory - Error getting smb://USERNAME:PASSWORD@192.168.1.1/
08:29:25.898 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://USERNAME:PASSWORD@192.168.1.1/) failed
08:30:30.496 T:1579676656 NOTICE: ES: Client from ::ffff:192.168.1.8 timed out
08:30:59.668 T:1959075840 NOTICE: Samba is idle. Closing the remaining connections

08:30:30.496 T:1579676656 NOTICE: ES: Client from ::ffff:192.168.1.8 timed out
08:30:59.668 T:1959075840 NOTICE: Samba is idle. Closing the remaining connections
08:34:16.345 T:1938813936 ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME@192.168.1.1/E
unix_err:‘d’ error : ‘Permission denied’
08:34:29.632 T:1938813936 ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME:PASSWORD@192.
unix_err:‘d’ error : ‘Permission denied’
08:34:31.916 T:1938813936 ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME@192.168.1.1/E
unix_err:‘d’ error : ‘Permission denied’
08:34:36.483 T:1959075840 ERROR: Previous line repeats 1 times.
08:34:36.483 T:1959075840 ERROR: GetDirectory - Error getting smb://USERNAME:PASSWORD@192.168.1.1/Entertainment/
08:34:36.483 T:1959075840 ERROR: CGUIDialogFileBrowser::GetDirectory(smb://USERNAME:PASSWORD@192.168.1.1/Entertainmen

Well points to a permission problem on the NAS

But I can access the NAS from my laptop(MacOS) with the same permissions.

Regards.

Hey guys,

I have exactly the same issue with the samba mounted drives on my asus router (similar model) since I updated osmc yesterday. I searched the internet and stumbled upon several posts about kodi in connection to smb issues. Although they are quite old (>1 year and older) I managed to get back access to my drives - although “operation repair kodi on RPi 3” is not finished yet.

What I did is to edit the smb.conf file of kodi which is located right here:

\IP of your RPi\osmc\.kodi\.smb

I added the lines:

client use spnego = no
client ntlmv2 auth = no

Now I was able to access my smb drives again - but only until i restarted the RPi. I guess it overwrites the smb.conf every time it reboots. I did not find the place of origin to make a permanent change.
I’d be more than happy to see your thoughts on this and get some advice for a permanent fix for me and the other ones out there.

Thanks and kind regards!

1 Like

We used to add these lines; but recently removed them. I don’t think they should be necessary anymore if you configure SMB via Kodi’s new menu option.

You mean the options found in the kodi settings->services->smb client menu, right?
I just tested all of them (none, max protocol 1,2 and 3) and wasn’t able to access the smb drives.

Hi Soshy, thanks for the reply. I did the changes adding the two lines in the smb.conf and I was able to access my samba drive with the user/password defined like it was working before. But like you said, when I restart the Rpi it overwrites the smb.conf again without the 2 lines added.

Regards.

A full debug log might help then.

Maybe we need to reinstate those two lines in to smb.conf; but it is unclear why yet.

Hi Sam, this is my first time in the forum. How do you want me to copy you the full debug log? Copy/Paste? Because I can only upload image files.

All build in OSMC
Either use grab-logs -A to upload a full set of the logfiles or you can use paste-log for specific files.

1 Like

Hi fzinken, thanks for the info. Here is the log:

https://paste.osmc.tv/uhoyirijex

Regards.

I´m having the same problem not being able to access smb shares. HDD attached to Asus router and multiple RPi3. One of them running as MySQL server, that one newly updated and out of order. I can still see all the Movies and TV Shows, but I can not play any of them. On the one I haven´t updated yet and from my windows laptop Everything works just fine.
I´ve tried adding “client use spnego = no client ntlmv2 auth = no” to smb.conf without any luck.
.

1 Like

Hi,

It would help us investigate this issue if you could please provide logs as directed above.

Thanks Tom.

Hi.
Here´s the log:
URL:https://paste.osmc.tv/xoziyeyigi

Thanks :slight_smile:

Hi Tom, I sent the log file (https://paste.osmc.tv/uhoyirijex)

Regards.

/home/osmc/.smb/smb.conf is persistent and will be injected in to the Samba config that Kodi uses.