During my migration from Windows Server 2003 to Server 2012, I encountered an issue with Kodi on Raspberry Pi and how it connects to the Win 2012 file share. When accessing the server with a Samba file share instead of a prompt for credentials the error message “Operation not permitted” is displayed.
Kodi allows the manual adding of network locations but does not support adding the credentials that are needed to access the location.
Therefore a bit of tweaking is needed to get access to Windows 2012 shares on Kodi.
The settings files for Kodi differ dependant on the system it is running, so its worth visiting the page to make sure the right files are edited, for example the files on a Raspbmc / OSMC installation on a Raspberry Pi is home/.kodi/userdata. Connect to the command console for the Pi using the default credentials (Raspbmc: pi/raspberry. OSMC: osmc/osmc) and navigate to the Userdata folder.
From here, first open the sources.xml file, and add the new share, using the previous share a guide of the code syntax.
Next, opening the passwords.xml file and add the credentials for the new share in a similar way.
Restart Kodi and try accessing the share to see if it works. This method works on both OSMC for Pi and Android installations of Kodi.