Guest - Testers are needed for the reworked CDateTime core component. See... https://forum.kodi.tv/showthread.php?tid=378981 (September 29) x
Solved Changing SMB Share password
#1
Hi everyone,

recently I had to re-install my NAS due to a drive failure, I chose to use a stronger password but then I started having issue while trying to show share folder contents in Kodi. I always get Operation not permitted error.

Things I tried and did't work:
  • Changing SMB versions
  • Deleting the old shares and adding new ones (I didn't delete the old Sources yet)
  • Updating the passwords.xml 
Changing the password back did work, although this is not a solution I'm happy with.

Am I missing something? Do I need to remove the old Sources and register new ones? Will this fix my issue? I don't want to fully re-index the library unless absolutely necessary.

From other threads I figured out, the Operation not permitted error is usually related to a system problem (SMB versions and encryption), which is obviously not my case. It also looks to me that Kodi is reusing the old password regardless of what I type in the box while adding a new share. What is the correct course of action?

My Kodi version is 18.7 running on Android TV. I also tried installing it on my phone and it worked just fine there.

Thanks a lot for any help or insight.
Reply
#2
Check also sources.xml in the userdata (wiki) folder (same one as where passwords.xml lives).

The old password may have been baked into the source URL in there.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#3
(2020-07-20, 14:47)DarrenHill Wrote: Check also sources.xml in the userdata (wiki) folder (same one as where passwords.xml lives).

The old password may have been baked into the source URL in there.

Thanks Darren, I did peek thought the sources.xml when searching the settings (I also do remember seeing it on the forums, mentioning what you just did about older settings having the password there). I looked there just to verify, no passwords though, looks like I have the newer version of settings format.

To be clear I did restart Kodi after modifying passwords.xml, is it the only file where passwords are stored? Are there any escaping, I do have special characters in my new password and I didn't know if some special treatment is needed. Should I try alphanumeric characters only to be extra safe? Hmm maybe I'll just copy passwords.xml from my Android phone.
Reply
#4
(2020-07-20, 15:51)shadow_cs Wrote:
(2020-07-20, 14:47)DarrenHill Wrote: Check also sources.xml in the userdata (wiki) folder (same one as where passwords.xml lives).

The old password may have been baked into the source URL in there.

Thanks Darren, I did peek thought the sources.xml when searching the settings (I also do remember seeing it on the forums, mentioning what you just did about older settings having the password there). I looked there just to verify, no passwords though, looks like I have the newer version of settings format.

To be clear I did restart Kodi after modifying passwords.xml, is it the only file where passwords are stored? Are there any escaping, I do have special characters in my new password and I didn't know if some special treatment is needed. Should I try alphanumeric characters only to be extra safe? Hmm maybe I'll just copy passwords.xml from my Android phone.

Ohhh it needs to be escaped using URI escaping (with %xx), I'll retry and check if this helps.
Reply
#5
Lightbulb 
(2020-07-20, 15:56)shadow_cs Wrote:
(2020-07-20, 15:51)shadow_cs Wrote:
(2020-07-20, 14:47)DarrenHill Wrote: Check also sources.xml in the userdata (wiki) folder (same one as where passwords.xml lives).

The old password may have been baked into the source URL in there.

Thanks Darren, I did peek thought the sources.xml when searching the settings (I also do remember seeing it on the forums, mentioning what you just did about older settings having the password there). I looked there just to verify, no passwords though, looks like I have the newer version of settings format.

To be clear I did restart Kodi after modifying passwords.xml, is it the only file where passwords are stored? Are there any escaping, I do have special characters in my new password and I didn't know if some special treatment is needed. Should I try alphanumeric characters only to be extra safe? Hmm maybe I'll just copy passwords.xml from my Android phone.

Ohhh it needs to be escaped using URI escaping (with %xx), I'll retry and check if this helps.
Ok that did it.

Takeaways:
  • Kodi uses single password per SMB server (multiple sources on a single SMB, cannot connect to multiple accounts).
  • It is impossible to change the password directly in Kodi UI.
  • The password can be updated by changing it in passwords.xml
    • Kodi needs to be restarted afterwards.
    • URIs (which include passwords) in passwords.xml need to be properly escaped.
      • [font]Preferably use passwords without special characters in them, do be extra safe use alphanumeric characters only.[/font]
[font]Would you consider adding more human-friendly way to change SMB share (and maybe other) passwords directly in Kodi?[/font]
Reply
#6
Thread marked solved.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply
#7
hello,

i think I have the same problem.

but I don't know how to modify file you are speaking about. because I'm using a mibox where there is no text editor
Reply
#8
(2021-04-29, 20:28)iostrym Wrote: hello,

i think I have the same problem.

but I don't know how to modify file you are speaking about. because I'm using a mibox where there is no text editor

using xfile I can modify the file on my mibox but not an easy job
Reply

Logout Mark Read Team Forum Stats Members Help
Changing SMB Share password0