Lost ability to connect to linux based samba shares with 2016.10-1 update

lost ability to connect to linux based samba shares with 2016.10-1 update. Keeps asking for password. nothing is change on the share side. all my other devices (android phones and windows PCs) can connect just fine.

I saw other posts like this for previous updates, but no real RCA as to why its broken and what’s needed to fix.

UPDATE:

I can use: mount -t cifs //ipaddress/sharename -o username,password and it mounts just fine. but can’t do it via kodi’s UI (filemanager or adding a source for video).

Samba share is on Samba v4.5.1

Windows is conneting to the same share with SMB2 protocol. using mount command, my pi is connecting with NT1 protocol. so its not protocol issue.

There were no Samba changes in the last upgrade, which version did you upgrade from?

To get a better understanding of the problem you are experiencing we need more information, including logs from you. Our wiki contains detailed steps for providing the relevant info we need to help you.

Upgraded from previous version to 2016-10.1 now on 2016-10.2

Uploaded the logs:

http://paste.osmc.io/xalajenaka

see access denied error logged in the log files and reference to user/password not found in settings.
Seems like kodi UI is not passing the username/password.

You have spaces in the URIs for your samba shares:

smb://192.168.1.3 / is not the same as smb://192.168.1.3/

kodi is failing to access because the spaces are being turned into %20 and so the URI is becoming smb://192.168.1.3%20%20/ which is incorrect.

Remove the spaces from the URIs in the file home/osmc/.kodi/userdata/sources.xml and you should be ok.

Actually the share on 192.168.1.3 / are working just fine with the space b/w… 3 and /.

192.168.1.3 is running samba 3.6
192.168.1.5 is running samba 4.5.1 and Kodi keeps asking for password with or without space in address.

You have spaces in the 192.168.1.5 entries too you can see them rendered as %20 (the URI encoding for a space) in the log file here:

15:52:37 155.900269 T:3023299504   ERROR: GetDirectory - Error getting smb://USERNAME:PASSWORD@192.168.1.5  /HD1/
15:52:37 155.901001 T:3023299504   ERROR: CGUIDialogFileBrowser::GetDirectory(smb://USERNAME:PASSWORD@192.168.1.5  /HD1/) failed
15:52:37 155.904419 T:2731336688   DEBUG: OpenDir: Using authentication url smb://USERNAME:PASSWORD@192.168.1.5%20%20/

These spaces are invalid characters and need to be removed.

Are the username and password for this share correct in passwords.xml?

Can you post the smbd.log from 192.168.1.5 also?

Yes username and password exists in passwords.xml and is correct. I have removed the spaces in the address, didn’t solve the issue.
from passwords.xml:

smb://192.168.1.5/HD1
smb://username:password@192.168.1.5/HD1/

smbd.og on 192.168.1.5 has the following entries:

[2016/11/11 21:06:52.552791, 0] …/lib/util/become_daemon.c:124(daemon_ready)
STATUS=daemon ‘smbd’ finished starting up and ready to serve connections

I can mount via this command no problem, but Kodi keeps asking for password as if I am providing wrong password:
mount -t cifs //192.168.1.5/HD1 -o username,password /media/HD1

Than I would say stick with fstab based mount as it is more performant anyhow

//192.168.1.5/HD1 /mnt/server_HD1 cifs x-systemd.automount,noauto,iocharset=utf8,user,username=XXXX,password=xXXXX,uid=osmc,gid=osmc,iocharset=utf8,file_mode=0770,dir_mode=0770 0 0

Got is sorted out. Issue related to to the samba update on Arch Linux from 2016-09-11. As a solution, ~/.smb/smb.conf on the RP has got to edited like in post #14.

solution posted here:

All well now.