operation not permitted when adding SMB share
#31
Had this problem on a newly built Raspberry Pi 3. Was an authentication error - the SMB share required a username and password.

1. Add Videos...
2. Browse
3. Add network location...

The Add network location will give you the fields to put in a username and password to access your shared folder.
Reply
#32
SOLVED here, thanks to the posts suggesting editing the config files.

I had punched in a typo when entering the samba u/p, and Kodi doesn't appear to ever reprompt you or allow edit in System settings.

I went here and fixed it: ~/.kodi/userdata/passwords.xml

It was enlightening to find out that the password is stored in plaintext there, good to know (and protect).
Reply
#33
(2016-12-21, 20:41)moodboom Wrote: SOLVED here, thanks to the posts suggesting editing the config files.

I had punched in a typo when entering the samba u/p, and Kodi doesn't appear to ever reprompt you or allow edit in System settings.

I went here and fixed it: ~/.kodi/userdata/passwords.xml

It was enlightening to find out that the password is stored in plaintext there, good to know (and protect).

Thank you for this, I have Kodi installed on a retropie build and entered in the wrong password. It never prompted again and I couldn't find a way to delete the information the I already saved. This is all I needed.
Reply
#34
After installing a new Synology NAS (718plus) and a new installation of KODI Jarvis I ran into similar problems adding paths.

How to fix this and what is very important:

- Put you password in the /userdata/passwords.xml file instead of the network path;
- Do not use special characters in your SMB/samba password. I had a # in it and this was the root of my problems;
- Paths should end with a slash (see underneath examples) in the files.

For your reference I included the relevant sections of the /Userdata/sources.xml & /Userdata/passwords.xml files. 

Hopes this saves you guys some time.

passwords.xml:

<passwords>
    <path>
        <from pathversion="1">smb://192.168.1.18/movies</from>
        <to pathversion="1">smb://xbmc:[email protected]/movies/</to>
    </path>
    <path>
        <from pathversion="1">smb://192.168.1.18/series</from>
        <to pathversion="1">smb://xbmc:[email protected]/series/</to>
    </path>
</passwords>



sources.xml:

    <video>
        <default pathversion="1"></default>
        <source>
            <name>movies</name>
            <path pathversion="1">smb://192.168.1.18/movies/</path>
            <allowsharing>true</allowsharing>
        </source>
        <source>
            <name>tvshows</name>
            <path pathversion="1">smb://192.168.1.18/series/</path>
            <allowsharing>true</allowsharing>
        </source>
    </video>
Reply
#35
It's a thread that just doesn't die!

I'm having the 'Operation not permitted' error when trying to access smb shares from a windows PC. The logs usefully show:
Quote:22:11:45.129 T:1691104240   ERROR: GetDirectory - Error getting
22:11:52.941 T:1691104240   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME@nas01/'
                                            unix_err:'1' error : 'Operation not permitted'
The interesting part is that I didn't modify the logs.. it actually says USERNAME in them. My passwords.xml file has the correct username (which isn't USERNAME) so where is kodi getting this rubbish value from? Typing in my correct user as part of the smb path "smb://user@nas01/Movies" still shows 'smb://USERNAME@nas01/Movies' in the logs. 

Any hints as to where it's getting the wrong value would be useful. Just for the record, I have never had a user called USERNAME on this RPi, on the nas, or on any pc ever.
Maz
Reply
#36
The logs are automatically sanitised (where possible) so that they can be shared for troubleshooting purposes without exposing such sensitive information.

It's to make things as secure as possible for non tech users.
|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
#37
(2017-12-31, 14:34)DarrenHill Wrote: The logs are automatically sanitised (where possible) so that they can be shared for troubleshooting purposes without exposing such sensitive information.

It's to make things as secure as possible for non tech users.
 Thanks, I wondered about that. It looks like a string replace. So do I just assume that it's trying the correct login and going wrong elsewhere? It doesn't give me many other hints as to where the problem lies. I'm just in the process of updating everything now but I don't believe it will help.

Do you know if blank passwords are no longer allowed? This might be more of a question for the OSMC people. It does seem to just be a login problem.
Reply
#38
The recent creator update changed a lot of things on Windows sharing. I think one of them is to stop blank password sharing.

A little googling may help there, but the issue may well be at the source end rather than the kodi one.
|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
#39
(2017-12-31, 15:11)DarrenHill Wrote: The recent creator update changed a lot of things on Windows sharing. I think one of them is to stop blank password sharing.

A little googling may help there, but the issue may well be at the source end rather than the kodi one.
The source end is a windows server that I built. It still accepts the blank password for shares. If it is a problem with blank passwords then it's either in OSMC or Kodi, I've allowed everything on the server side. I have kodi running on a windows pc as well, and it can still access the files with a blank password, I just don't know as much about linux or why it doesn't even prompt me for a login.

EDIT: I just tried it on the RPi with an account that does have a password, got the same error. It doesn't prompt me for login details so I used the "smb://username:password@nas01/Movies" format for the path. It just gives the same "Operation not permitted" message.
Reply
#40
https://support.microsoft.com/en-gb/help...erver-2016
|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
#41
(2017-12-31, 15:24)DarrenHill Wrote: https://support.microsoft.com/en-gb/help...erver-2016
 As I said, not the server end. It's not guess access. The server is accessible by everything else. It's not windows 10 based. etc.
It's something on the samba, osmc, kodi, linux end. Something new.
Reply
#42
OSMC/Kodi/Linux no longer supports blank samba passwords, and still doesn't support complex passwords (due to having to type it into the path, rather than being prompted).

I relaxed the password requirements on the server, and then made a new user with a crappy password to get mine to work.
Reply
#43
Im having the same issue from an android smartphone. Tried messing around with password.xml but nothin works, i always get the "option not permited" error.
Reply
#44
(2018-01-14, 16:49)samplerico Wrote: Im having the same issue from an android smartphone. Tried messing around with password.xml but nothin works, i always get the "option not permited" error.
 Same here. Just bought a Synology DS16j to get around the problems with samba-share from Windows 10. Now I get "operation not permitted" on both my kodi-installations on S8 and Shield TV when trying to add the Synology NAS. Editing password.xml and sources.xml didnt work.

Edit: got it working on S8 by manually adding network location.
Reply
#45
Hi!
I had the same Problem, but i "solved" it.
libreleec 8.2.5 on odroid c2:
i alway did smb with authentication with kodi on my windows pcs.
on odroid smd shares did work, just except one on my synology ds412+.
on the dsm i activated SMB1-3 for sharing. that worked for mounting the share in CLI but not in kodi.
the solution for me was to change the name of the share!
i have two servers both with "filme" (german word for movies) share (server1/filme + server2/filme).
server1/filme worked fine, but server2/filme alway gave "operation not permitted". When i changed server2/filme to server2/movies kodi access worked!
Maybe it will help other users with the same problem Smile
Reply

Logout Mark Read Team Forum Stats Members Help
operation not permitted when adding SMB share0