Yet another SMBv2 issue

  • Hi there,

    So I did read:

    * RE: SMB2/3

    * RE: SMB not working

    * RE: SMB shares not working - LibreELEC 8.95.001 on Raspberry PI 2

    But I still fail to configure kodi after switching my freebox this monday to SMBv2. I can still access my SMBv2 share from my main linux workstation (cifs mount share), so the switch was rather smooth. But for some reason I am missing something on RPi3b+ side.

    Here is what I have in /storage/.kodi/userdata/sources.xml (everything is pure ASCII):

    Code
    <source>
    <name>musicvideo</name>
    <path pathversion="1">smb://guest:guest@FREEBOX_SERVER/Freebox/musicvideo/</path>
    <allowsharing>true</allowsharing>
    </source>

    I picked 'guest' / 'guest' since I do not use account/password in my configuration:

    After reboot and selection, here is what I get in the /storage/.kodi/temp/kodi.log:

    Code
    2021-04-27 20:46:46.012 T:1936857536   DEBUG: OpenDir: Using authentication url smb://USERNAME:PASSWORD@FREEBOX_SERVER/Freebox/musicvideo
    2021-04-27 20:46:47.033 T:1936857536   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME:PASSWORD@FREEBOX_SERVER/Freebox/musicvideo'
    unix_err:'16' error : 'Invalid argument'

    If I use 'guest' / 'guest' from my main linux workstation this works as expected:

    Code
    $ smbget -u guest -w RMT -R -v 'smb://RMT;guest@FREEBOX_SERVER/freebox/Photos'
    mkdir failed on directory /var/run/samba/msg.lock: Permission denied
    Can't open directory guest: Unknown error 8216
    Password for [guest] connecting to //freebox/FREEBOX_SERVER:
    Using workgroup RMT, user guest
    smb://RMT;guest@FREEBOX_SERVER/freebox/Photos/bla.jpg
    Downloaded 0b in 3 seconds

    Here is what i have on my linux x86 workstation (and it is working fine)

    Code
    //freebox_server/freebox on /media/freebox type cifs (rw,relatime,vers=3.0,sec=none,cache=strict,uid=1000,forceuid,gid=1000,forcegid,addr=192.168.0.254,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,nobrl,rsize=4194304,wsize=4194304,bsize=1048576,echo_interval=60,actimeo=1,x-systemd.automount,_netdev)

    My goal is to avoid going back to the old SMBv1 protocol so that my work laptop (windows 10) can access my freebox share drive.

    I have also tried setting min and max SMB protocol in the Kodi UI (currently SMBv2 as min and max).

    What should I try next ?

    Thanks

  • Users frequently try to avoid setting a credential on shares believing "no passwords" to be easier. It is not, and how different OS with different versions of SMB/CIFS software will work gets a bit random. Set a credential and then configure the things that need to access the share to use it. This is how the software has been designed to work. This is how you get a consistent experience over all devices.

  • Users frequently try to avoid setting a credential on shares believing "no passwords" to be easier. It is not, and how different OS with different versions of SMB/CIFS software will work gets a bit random. Set a credential and then configure the things that need to access the share to use it. This is how the software has been designed to work. This is how you get a consistent experience over all devices.

    Thanks for the support. So I did setup a simple freebox/freebox credential, reboot the freebox (mini 4k) and updated on the kodi side with:

    Code
    <source>
    <name>musicvideo</name>
    <path pathversion="1">smb://freebox:freebox@FREEBOX_SERVER/Freebox/musicvideo/</path>
    <allowsharing>true</allowsharing>
    </source>

    I rebooted the kodi system (LE 9.2.6). And looking at the kodi.log file I still see the same message:

    Code
    2021-04-30 19:01:26.462 T:1454392192   DEBUG: OpenDir: Using authentication url smb://USERNAME:PASSWORD@FREEBOX_SERVER/Freebox/musicvideo
    2021-04-30 19:01:27.485 T:1454392192   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://USERNAME:PASSWORD@FREEBOX_SERVER/Freebox/musicvideo'
    unix_err:'16' error : 'Invalid argument'
    2021-04-30 19:01:27.485 T:1454392192   ERROR: GetDirectory - Error getting smb://USERNAME:PASSWORD@FREEBOX_SERVER/Freebox/musicvideo/

    I did check from my amd64 linux workstation that the setup was accepting account correctly:

    Code
    smbget -u freebox -w RMT -R -v 'smb://RMT;freebox@FREEBOX_SERVER/freebox/Photos'
    mkdir failed on directory /var/run/samba/msg.lock: Permission denied
    Can't open directory freebox: Unknown error 8216
    Password for [freebox] connecting to //freebox/FREEBOX_SERVER:
    Using workgroup RMT, user freebox
    bla.jpg is up-to-date, skipping
    Downloaded 0b in 3 seconds

    If I enter the wrong password I get an error:

    Code
    % smbget -u freebox -w RMT -R -v 'smb://RMT;freebox@FREEBOX_SERVER/freebox/Photos'
    mkdir failed on directory /var/run/samba/msg.lock: Permission denied
    Can't open directory freebox: Unknown error 8216
    Password for [freebox] connecting to //freebox/FREEBOX_SERVER:
    Using workgroup RMT, user freebox
    Can't open directory smb://RMT;freebox@FREEBOX_SERVER/freebox/Photos: Permission denied


    Is there a way to have even more verbose message, or a tool to diagnose the issue ?