OSMC Security Update for OSMC 2016.04-1 and earlier

Just updated my Pi3 from OSMC2016.04-1 to 2016.04-2 and now the connection to my Windows 7 SMB Share fails when I try to play my music. The original Samba was installed from the appstore. I wanted to include my kodi log file but the extension is not allowed.

No need for the log file. We are aware of the problem. If you have used guest/password less share access currently the only way is to change that to non guest user based access with password until hopefully a fix will be provided from upstream.

Thanks, I will try that.

Iā€™ve had trouble connecting to my Airport Extreme with error messages like:

22:46:03 34.123817 T:1626338288 ERROR: SMBDirectory->GetDirectory: Unable to open directory : ā€˜smb://USERNAME:PASSWORD@HOSTNAME/PATHā€™
unix_err:ā€˜2ā€™ error : ā€˜No such file or directoryā€™

The fix was fairly straightforward, disable SPNGO since AE supports only SMB1 protocol.

Add the following lines to ~/.smb/smb.conf into the [global] section:

[global] ... client use spnego = no client ntlmv2 auth = no

@spity thanks for the tip can you check if that survive a reboot as I had the impression kodi dynamically generates the file

It does on my install

Thanks

I can patch Kodi to add these two lines if some other users can confirm this helps. I built a version of Kodi that appended these lines to smb.conf before and @fzinken tested it but we didnā€™t have any joy.

Sam

Hereā€™s how I got these two lines (apt-get install samba first):

smbclient -d 255 -U USER -I HOSTNAME ā€˜\\ā€™

ā€¦ Server does not support EXTENDED_SECURITY but 'client use spnego = yes and 'client ntlmv2 auth = yes' ā€¦

Iā€™ve added these lines into /etc/samba/smb.conf which fixed smbclient, however Kodi still didnā€™t work, I then added them to the user specific config and Kodi succeded connecting to the Airport.

Iā€™m not sure this fixes Windows 10. However the test is simple, just smbclient the IP of your Windows 10 box.

I gave this a try, but it did not seem to work (continued to receive ā€œerror openingā€ messages). Running Windows 7 and Pi2.

I also tried putting the new rows at the top of smb.conf, just under [global]. And I also tried setting them both to = yes. Reboot after each change, but nothing worked for me.

Maybe I did something wrong? Here are the details I used:

osmc@osmc:~/.smb$ sudo nano smb.conf

[global]
    preferred master = no
    local master = no
    domain master = no
    client lanman auth = yes
    lanman auth = yes
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=65536 SO_SNDBUF=65536
    lock directory = /home/osmc/.smb/
    name resolve order = bcast host
    client use spnego = no
    client ntlmv2 auth = no

osmc@osmc:~/.smb$ sudo reboot

If I remember correctly you have guest/passwordless shares.
This two lines are only fixing the issue accessing old (smb1) samba shares.

Yes.

OK. Sorry for the misunderstanding.

I wish I had found this thread before trying to install OSMC and then after configuring it spend quite a while trying to access my non passworded shares on my Windows 10 Media Server :frowning:

Sadly I canā€™t access them at all and I am not going to change to a password media server as we have so many mobile devices in our house which, once accessed the home network, simply ahre everything fine, with the level of access we require.

Good luck with the resolve. Iā€™ll put aside my attempts to test out OSMC.

Just updated my Pi to 2016.05-1 and resolved the password less SMB share issue. In this release you can go to music>>files and select your shared file. It prompts you for a username and password and the option to remember it. Here I just entered my main Windows 7 Username and password and the share was opened and my music is playing again. I assume the same will apply to movies and videos, which I donā€™t use.
So as far as I am concerned, this problem is solved without having to go the password protected SMB share routeā€¦:smiley:

Hi,
i have the same issues while trying to access via smb connection my shared folder in windows 7 where i have no account and no psw setted.
Iā€™ve read the previous posts but i couldnā€™t understand how (and if) i can get through this in user friendly way.
Can you you please help me? Thank you.

No need to do or change anything on the Windows 7 side. Just go to your files in OSMC and click on the share that you previously had. It will prompt you for a username and password. Just use the standard username and password that you normally use to log onto Windows 7 and after that you can use the share as before.

Okā€¦
so do I need to set a password for my win 7 account even if i never had one before?

Thanks

Hi Gierre, I always had a password on my Windows 7 account, so I donā€™t know what will happen if you donā€™t have such an account. You can try to type just your Windows username in OSMC with no password and see if it works. Let me know what happens.

Hi AndreB,
i have tried sharing a folder (everyone access allowed) from a win 7 account with no pw setted and i can confirm that now i can access it via OSMC samba sharing protocol.
Do you think that i could have safety issues with such a basic configuration?

Gierre, I guess it it always safer to have a password on your Windows account to help prevent attacks from the Internet. I am not sure if there is a danger from the OSMC side into your Windows PC because I donā€™t know enough about the underlying linux operating system. Maybe an OSMC expert or developer can answer that question better. Glad you managed to get access to your share via OSMC.