Lost in the Samba ocean :(

Dear friends,
I’ve perused this forum and googled 12+ pages but I’m stuck :frowning:

Problem started when trying to mount a samba share from a Raspbian (debian 12) server on the Vero.

The sharing via the menus did not work so tried to assess the underlying situation.

Here follows my server config and situation and then the unsuccessful mount on the Vero. The same mount does work from my Mac machine without problems.

Server config and situation:

bob@rutorrent:/etc $ sudo testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
        log file = /var/log/samba/log.%m
        logging = file
        map to guest = Bad User
        max log size = 1000
        obey pam restrictions = Yes
        pam password change = Yes
        panic action = /usr/share/samba/panic-action %d
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        passwd program = /usr/bin/passwd %u
        server min protocol = SMB3
        server role = standalone server
        unix password sync = Yes
        idmap config * : backend = tdb


[rpi4]
        create mask = 0077
        directory mask = 0777
        guest ok = Yes
        path = /4TBHDD/download
        read only = No
bob@rutorrent:/etc $ sudo service smbd status
● smbd.service - Samba SMB Daemon
     Loaded: loaded (/lib/systemd/system/smbd.service; enabled; preset: enabled)
     Active: active (running) since Mon 2024-01-29 18:01:31 CET; 9min ago
bob@rutorrent:/etc $ smbclient -L 192.168.1.18
Password for [WORKGROUP\bob]:

        Sharename       Type      Comment
        ---------       ----      -------
        rpi4            Disk      
        IPC$            IPC       IPC Service (Samba 4.17.12-Debian)
SMB1 disabled -- no workgroup available

and now on the client (the Vero box) the following command works:

osmc@osmc:/mnt/rpi4$ smbclient '\\192.168.1.18\rpi4' -U bob
Enter WORKGROUP\bob's password: 
Try "help" to get a list of possible commands.
smb: \> ls
  .                                   D        0  Mon Jan 29 10:23:08 2024
  ..                                  D        0  Wed Jan 17 17:43:04 2024
  movies                              D        0  Sat Jan 20 18:40:35 2024
  videos                              D        0  Sun Dec 24 07:56:01 2023
  ebooks                              D        0  Mon Jan 29 09:13:28 2024
  win                                 D        0  Thu Nov 30 17:04:18 2023
  web                                 D        0  Thu Dec 24 12:36:15 2020
  .DS_Store                          AH    10244  Sat Jan 20 18:24:32 2024
  mac                                 D        0  Fri Jan 19 08:50:15 2024
  temp                                D        0  Tue Jan 16 20:21:59 2024
  autodl                              D        0  Sun Feb 13 16:52:38 2022
  tv                                  D        0  Thu Aug 31 20:33:51 2023
  audio                               D        0  Fri Jan 19 17:37:28 2024
  complete                            D        0  Tue Jan 16 20:21:59 2024
  music                               D        0  Fri Jan 19 17:37:58 2024

but I am not succeeding to mount this share on the vero.
This is the last command I have tried:

osmc@osmc:/mnt/rpi4$ sudo mount -v -t cifs -o vers=3.11,cred=/etc/smb_credentials.txt,sec=ntlmv2  //192.168.1.18/rpi4 /mnt/rpi4mount.cifs kernel mount options: ip=192.168.1.18,unc=\\192.168.1.18\rpi4,vers=3.11,sec=ntlmv2,user=bob,pass=********
mount error(13): Permission denied

where the /etc/smb_credentials.txt file is as follows:

osmc@osmc:/mnt/rpi4$ ls -l /etc/smb_credentials.txt 
-rw------- 1 root root 31 Jan 29 17:55 /etc/smb_credentials.txt
osmc@osmc:/mnt/rpi4$ sudo cat /etc/smb_credentials.txt 
username=bob
password=SANITIZEDPASSWORD

and the mountpoint is:

osmc@osmc:/mnt$ ls -la
total 12
drwxr-xr-x  4 root root 4096 Jan 29 18:29 .
drwxr-xr-x 23 root root 4096 Sep 19  2022 ..
drwxrwxrwx  2 osmc osmc 4096 Feb 13  2023 rpi4
drwxr-xr-x  2 root root    0 Jan 29 12:53 rpi4auto

dmesg shows errors such as:
[20141.094777] CIFS VFS: cifs_mount failed w/return code = -13

I am really out of ideas/clues.

Thanks for any help.

That mount command your trying to use doesn’t look right. I would suggest to look over either of these…

Or just use a Kodi path by going to Videos>files>add videos>browse>add network location>. In that screen enter only the IP address in the server name field and fill in the user and password then click OK. This should then give you a new entry in the browse section where you can just navigate to your paths you want to add to Kodi.

2 Likes

Thanks will peruse those hoping to spot the problem. Tried with both automount and fstab with mixed results. Yesterday night finally I did find a way to mount via fstab and mount but the performance is horrible and movies buffer all the time …

I got to this trouble since the Kodi menus as you kindly suggest did NOT work :frowning:

Take care

You might try checking your network connection between the two…

Did you actually try it by adding a network location like I outlined or did you just tell it to browse and go directly to the server? The latter will typically fail if credentials are needed and that is what adding network location does for you.