Can't reach my SMB shares after the last OSMC update!

@were55

I too have an ASUS router. An RT-N56U.
The smb.conf work around does not work for me either. I have done the latest firmware upgrade from ASUS. It didn’t help. I’m using an rpi2 as the osmc client.

I added the mounts in the /etc/fstab file and they work when I do a mount -a from a telnet session. However I get errors during the osmc boot up and it’s not working there either. I’m not that much of a Linux expert to fix that problem. Some dependency issue I’m sure.

@Rick949 :slight_smile: same router, same RPI 2, same issue…hope can be fixed soon.

For the build in Kodi smb browser to work with the settings you would need to add them to .smb/smb.conf

Maybe try that first. If no success than let us know your fstab and grab-logs -J so we can check for issuess.

1 Like

@fzinken thanks a lot, it worked only modifying smb.conf under .smb.

Me too.

Learn something every day.

@baracudaz could you please edit your post.
The lines should be added to .smb/smb.conf if it is for the kodi based browsing.
If you refer to fstab based or actually the osmc samba server write that explicitly.
Thanks

Thank you… I finally have an SMB connection to my Airport Extreme.

edit: that was short lived, now it kicks me a error: Connection timed out. haha, I can’t win lately.
More info, it times out only when scanning into library (MySQL) but seems to play one of (the few) movies it scanned in without any issue. Looks like it resets the connection after every movie it scans in…
unix_err:'68' error: 'Connection reset by peer'

If client NTLMv2 auth = no doesn’t break other devices then I could make this a default.

Hi folks,

Of course I did add client ntlmv2 auth = yes option to local samba conf file .smb/smb.conf
However this was not that obvious with troubleshooting as smbclient would still fail with the same error:

 server does not support EXTENDED_SECURITY  but 'client use spnego = yes and 'client ntlmv2 auth = yes' session setup failed: NT_STATUS_ACCESS_DENIED

Digging into strace output reveals smbclient is ignoring the local file and taking the global setting file:

$ strace smbclient 2>&1 | grep smb.conf
stat64("/etc/samba/smb.conf", {st_mode=S_IFREG|0644, st_size=9329, ...}) = 0
open("/etc/samba/smb.conf", O_RDONLY|O_LARGEFILE) = 4

The behaviour of smbclient did finally change only after I have added client ntlmv2 auth = yes to global /etc/samba/smb.conf. Hence the confusion.

So for OSMC in general I suppose both .smb/smb.conf and /etc/samba/smb.conf should have this option in. What do you think?

Well yes and no. It doesn’t harm to have it in both files. But the Kodi internal smb client will only use .smb/smb.conf but if you also use the command line in parallel (e.g. for troubleshooting you need it in both.
Thanks for highlighting.

Thanks guys. This fix helped me out!
Edit: oops, not really fixed. All the files appeared in osmc, all episodes doubled, nothing plays back. RT-AC66U.Weirdly I can access files on that Asus SMB server on other devices (ie Windows 10) but not on OSMC.

Edit2: It was actually my mistake. Messed up the first conf. This here made it work again:

client use spnego = no
client ntlmv2 auth = no

So thanks, again :slight_smile:

[global]
        client NTLMv2 auth = no

Adding the above to ~/.smb/smb.conf didn’t work for me. I did a reboot but OSMC still asks for a password.

Occording to my log, I had the following samba packages installed when the system still worked. Does anyone know how to downgrade to these packages? I get an error.

sudo apt-get install samba-common:armhf=4.1.17+dfsg-2+deb8u1 samba-libs:armhf=4.1.17+dfsg-2+deb8u1

Error:

E: Version '4.1.17+dfsg-2+deb8u1' for 'samba-common' was not found
E: Version '4.1.17+dfsg-2+deb8u1' for 'samba-libs' was not found

It is not really helpful if you post your identical question in two threads!
There is no simple way to downgrade as the files have been removed from the debian deb, otherwise we already have indicated that as a solution.

Can you expand on what error are you seeing @CorK?
Did you try smbclient -L <server> -U <user> command? Any errors there?

Sorry guys, I’m new here and no pro in Linux. Just thought that my issue was related to both topics because it was about samba malfunctions after an OSMC update. Anyway, I understand downgrading is no option.

Yesterday I tried to access an SMB share. I have been using this share for a long time but now suddenly I get this screen asking me for credentials:


Sorry, I’ve got no better cam at the moment.

The SMB share is unchanged and the subfolder Videos is public, so no password should be required. @baracudaz that’s why I added a -N to your command (=skip password prompt).
smbclient -L //CORK_DESKTOP -U Guest -N

I also entered the IP because that’s what OSMC uses. The result is different.

smbclient -L //192.168.1.100 -U Guest -N

I can even get it to show the movies inside the network share. Command:

smbclient //192.168.1.100/Videos/ -U Guest -N
ls Movies

Is this enough to proof that my share is visible publicly? Now, how do I get OSMC to scan it again?

If you are able to access your samba share with smbclient from the command line you should be able to access by entering a fstab line.

  1. Create local directory sudo mkdir /mnt/Videos
  2. Edit fstab sudo nano /etc/fstab
  3. Add at the end //192.168.1.100/Videos /mnt/Videos cifs noauto,guest,x-systemd.automount,rw 0 0
  4. Save and Exit Ctrl-O Ctrl-X
  5. Try to mount with sudo mount /mnt/Videos

If all is successful your samba share should now be accessible at /mnt/Videos.

2 Likes

Thanks a lot @fzinken. This works and is three times faster when navigating through the folders. In step 5 you forgot mount though.

I didn’t prefer a mount as solution, but because of the speed, I’ll keep it.

Maybe you can answer my main doubt: Will I be able to access the mount without hassle if the server is turned off and on again? Like when the server shuts down while OSMC is running, or it isn’t started up yet when OSMC is.

Thanks, I added that

The auto mount should ensure that but not really guaranteed.
But if the server is not always available it is not a server. Why not making the RPi the server for your Videos?

Money… The computer containing the videos is actually just a desktop. I don’t have an external drive. I’ll think about buying one sometime.

Anyhow, thank you very much! My issue is solved. I hope the auto mount will do it’s job flawlessly :smiley: