Vero 4k+ "Operation not permitted" Fritz.NAS via smb

Hi, I’m planning to get a NAS in the near future. To test some of its benefits out first I connected an old HDD to my AVM Fritz Box router and enabled the NAS feature.

Whenever I try to connect to it from my Vero 4k+ via smb, I get the error message “Operation not permitted”.
I tried everything I can think of in the settings but it just doesn’t work. I can access the NAS without problems on a windows laptop and a Fire TV stick.

My settings:
minimal protocol SMB2
max protocol SMB3
but I tried minimal SMB1 or even none as well.

I tried to add a source by using
add Shared Network (I don’t know the exact English term used in Kodi)
Input Data:
Protocol SMB
Server: (which is the router)
Share: (in my case)
User and Password (created in the router and work fine on the fire TV)

After confirming, I get the error message.
I tried different setting with the name of the NAS as well but as it works on other devices I don’t think that is the problem.
Is there anything I could try differently? I tried to do this for several hours the other day.
It would be awful to buy a NAS and then get the same error so I want to solve it upfront :smiley:

Suggest to check somethings via command line (SSH) if that is something you are able to do.

Details regarding how to access the command line interface can be found here on our Wiki: Accessing the command line - General - OSMC

When you are connect run smbclient -U <your username> -L you then should be asked for your password and please share the output afterwards.
If you get smbclient: command not found run sudo apt-get install smbclient first.

Hi, I’m still not very skilled in this command thing but I sure try my best.
Which username do u mean? My Vero one or the username I set up for the NAS access? I tried both though.
I had to install the smbclient first although I installed it before on the MyOSMC menu

Before beeing asked for the password I get a message:
Not enough '' characters in service
Usage: smbclient [-?EgqBVNkPeC] [-?|–help] [–usage] [-R|–name-resolve=NAME-RESOLVE-ORDER] [-M|–message=HOST]
[-I|–ip-address=IP] [-E|–stderr] [-L|–list=HOST] [-m|–max-protocol=LEVEL] [-T|–tar=<c|x>IXFvgbNan]
[-D|–directory=DIR] [-c|–command=STRING] [-b|–send-buffer=BYTES] [-t|–timeout=SECONDS]
[-p|–port=PORT] [-g|–grepable] [-q|–quiet] [-B|–browse] [-d|–debuglevel=DEBUGLEVEL]
[-s|–configfile=CONFIGFILE] [-l|–log-basename=LOGFILEBASE] [-V|–version] [–option=name=value]
[-O|–socket-options=SOCKETOPTIONS] [-n|–netbiosname=NETBIOSNAME] [-W|–workgroup=WORKGROUP]
[-i|–scope=SCOPE] [-U|–user=USERNAME] [-N|–no-pass] [-k|–kerberos] [-A|–authentication-file=FILE]
[-S|–signing=on|off|required] [-P|–machine-pass] [-e|–encrypt] [-C|–use-ccache] [–pw-nt-hash]
service (password)

After the password I still get:
-bash: (password) : command not found

Your NAS User

What did you exactly typed? Sometimes people get confused. When I write <your username> this means to replace the whole part with your username. So e.g. smbclient -U osmc -L

thanks for explaining, but I thought as much.

I typed:
smbclient -u Vero -L

Response is:
Not enough \ characters in service

My bad, it’s capital U so smbclient -U Vero -L

I will correct it in my above post to avoid copy and paste error in the future

Sorry I should have figured that out myself as the system even showed me what these letters actually stand for.

Now I get:
Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC Service Disk FRITZ!Box
SMB1 disabled – no workgroup available

Ok, looks fine. Not sure why adding the source in Kodi doesn’t work. You could enable debug logging try again and then upload the logs for us to check.
But for a long term solution (which also would make a switch to your future NAS easier) maybe you can take a look at using kernel mounts with autofs

I have to read into what exactly that is but I’ll definitely consider it for my long term solution if you recommend it.

now I enabled log, did a restart and tried to add the source again.
This is the log diqavedika

i hope it shows something to identify the error.

2022-11-23 13:49:01.476 T:2768    ERROR <general>: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME:**masked*by*grab-logs**@'
                                                   unix_err:'1' error : 'Operation not permitted'

Unfortunately not, I think if we want to dig deeper you would need to enable the SMB component specific debug logging below is for all components but that should show you how to do it.

But to be honest I assume using autofs would be faster without spending debugging time.

OSMC skin screenshots:

I think I’ll check out that autofs tonight, but I still tried the log.
This Vero is laughing at me for some days now and I think it is time to make him shut up :smiley: zinoxoyive

While I would not trust the logs but might be old information in your passwords.xml

SPNEGO login failed: The attempted logon is invalid. This is either due to a bad username or authentication information.

You could try rm /home/osmc/.kodi/userdata/passwords.xml and then try to connect again

We have a BINGOOOOOO!!!

Crazy. What is this password.xml and why did it try to make me misery? :smiley:
I can now connect and access the NAS drive.
Thanks very much for the detailed help. I appreciate it.

passwords.xml stores your username/passwords for the servers. And you must have connected to the fritzbox in the past with a different username/password

hm that is a bit weird. The other one I used was also a user that is allowed to access the NAS.
But I will not complain. Sometimes it seems nothings works better than some kind of reset. I would have tried that earlier probably if I knew something like that existed (and how to do it).
Again thanks a lot for your help.