Unable to access SMB shares on RPi solved

Something happened with my RPi recently – I don’t know exactly when it happened – where I couldn’t access my SMB shares. I had a look here and saw references to such problems for the Vero, but didn’t see anything that matched my issue with the RPi. I tried a solution posted in the Vero section that worked for me, so I thought I’d report it here.

I navigated to Settings>Services>SMB Client and noticed that Minimum protocol version was set to none and maximum set to SMBv1. I changed the maximum to SMBv3 and that solved my problem. I can now access all my SMB shares.

Did something get changed in a recent update that caused this problem for me? I’m just curious at this point.

No update of OSMC would have caused that. You must have made that config setting in the past. And I assume the SMB version on your server changed in the meantime not supporting v1 anymore.

Thanks for the quick reply.

I’ve quite sure I didn’t make any changes to the SMB version myself. My server is a Windows 10 desktop, and I’ll bet dollars to doughnuts that something about SMB changed in a recent Windows 10 update. I’ll dig around to confirm that, but the good news is I’m working just fine.

No comment

Well Windows 10 basically started to disable SMB1 2 years ago but was keeping it enabled if devices still accessed via SMB1. So maybe some unused time made Win10 now to disable it.

This article gives powershell commands to check if SMB1 is on or off

It turns out the powershell commands given in the referenced article won’t run on my desktop, they only run under Windows Server, not Windows 10. I tried to figure out how to enable them in Windows 10, but, after looking for 30 minutes, decided to abandon the search.

I’ll just assume SMBv1 was disabled on my computer during a recent Windows 10 update.

Thanks for the help.

Hi,

Just tried the powershell commands on my windows 10 vm and it does look like the docs provided my microsoft could do with an update. Anyway you should be able to check/re-enable smb1 via Turn Windows features on and off:

Thanks Tom.

Thanks Tom.

I checked the link you provided and navigated to the “turn Windows features on or off” option in “Programs and Features” in “Control Panel”.

Yep. SMB1 had been disabled (it wasn’t checked). I left it disabled, since I can access my files now, having reset my OSMC options to use SMBv2 or SMBv3.

I was able to access all my files a couple months ago, so SMBv1 was enabled then. (I don’t remember the last time I had accessed these files.) So, some Windows update in the past 2-3 months ended up disabling SMBv1.

1 Like

Hi, I’m crazy here trying to access osmc samba folders (external HDD). It must be a windows thing, because I can connect to the samba folder using android and a mac. Had try the following:

  • Activate SMB1 on windows 10
  • Enable insecure guest logons
  • On osmc, minimum protocol NONE, maximum SMBv3

Using the same workgroup (default) and I cant see the server on network folder, when i try to connect mapping the folder always the same error
image
image

This is the smb.conf

[global]

# If you require a fully custom smb.conf create smb-local.conf instead of editing smb.conf so your
# configuration will not be overwritten by samba upgrades. You can use smb.conf as a template by
# copying it to smb-local.conf then removing the config file line below in the new file. If you only
# need to add some additional shares see smb-shares.conf below for a simpler way to do this.

    config file = /etc/samba/smb-local.conf

    workgroup = WORKGROUP
    security=user
    follow symlinks = yes
    wide links = no
    unix extensions = no
    lock directory = /var/cache/samba
    load printers = no
    printing = bsd
    printcap name = /dev/null
    disable spoolss = yes
    log level = 1
    map to guest = bad user
#   usershare template share = automount template

    write raw = Yes
    strict locking = no
    min receivefile size = 16384
    use sendfile = true
    aio read size = 2048
    aio write size = 2048
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=131072 SO_SNDBUF=131072

[osmc]
    browsable = yes
    read only = no
    valid users = osmc
    path = /home/osmc
    comment = OSMC Home Directory

[automount template]
    browseable = yes
    -valid = no
    valid users = osmc
    path = %P
    hide files = /$RECYCLE.BIN/System Volume Information/desktop.ini/thumbs.db/

# Add custom shares in smb-shares.conf instead of editing smb.conf so they will not be
# overwritten by samba updates. You can only add new shares to smb-shares.conf, not change
# the default shares or global options. If you need full control see smb-local.conf above.

include = /etc/samba/smb-shares.conf

Thanks for any kind of advice

That is only for Windows as server

That is only for OSMC as client

So you confirmed that 192.168.1.12 is the IP of your OSMC server?

On your windows machine in CMD run
net use * /del.
net use \\192.168.1.12\osmc /user:osmc

I’m going to cry! It WORKED!! Damn you can’t imagine how many hours I spend trying to fix this… I fell so dumb

image

After this I just run \\192.168.1.12 and it pop up!

Life saver man, I will print this and put it on my fridge :ok_hand:

Sadly I realized that after a log out or reboot the same problem appear when I try to open the disk. To make it work again I have to disconnect the disk and use net use \\192.168.1.12\osmc /user:osmc Any advice to fix this?

image

If I keep trying to open the disk sometimes the error is different

image

Why are you trying to connect to /media ?

i just use “\\vero4k\My book”, or to the other drive “\\vero4k\disken” in explorers adressfield( without th “”), Vero4k can be replaced with you ip-number, but since I got great nameresolution in my local network I don’t bother with local ip’s.

I start from the first step but using the name of the server (rasp 3b+), on terminal i type net use \\eltemplomedia\osmc /user:osmc, after that my password, works fine

  1. Run the address with the name, not IP
    image

  2. The folder appear correctly

  3. Right click on the folder and Map network drive to add it

  4. All look good, I can open it, transfer files, etc

  5. After reboot or log out, I cant access the folder

  6. If I try opening the folder again, this other message popup

I check with sudo journalctl and saw that every minute the message Failed to start OpenBSD Secure Shell server

sudo journalctl

    Sep 29 20:41:00 ElTemplomedia systemd[1]: Failed to start OpenBSD Secure Shell server.
    Sep 29 20:41:01 ElTemplomedia systemd[1]: ssh.service: Service RestartSec=100ms expired, scheduling restart.
    Sep 29 20:41:01 ElTemplomedia systemd[1]: ssh.service: Scheduled restart job, restart counter is at 372.
    Sep 29 20:41:01 ElTemplomedia systemd[1]: Stopped OpenBSD Secure Shell server.
    Sep 29 20:41:01 ElTemplomedia systemd[1]: Starting OpenBSD Secure Shell server...
    Sep 29 20:41:01 ElTemplomedia sshd[13015]: Server listening on 0.0.0.0 port 22.
    Sep 29 20:41:01 ElTemplomedia sshd[13015]: Server listening on :: port 22.
    Sep 29 20:41:01 ElTemplomedia CRON[13024]: pam_unix(cron:session): session opened for user root by (uid=0)
    Sep 29 20:41:01 ElTemplomedia CRON[13023]: pam_unix(cron:session): session opened for user root by (uid=0)
    Sep 29 20:41:01 ElTemplomedia CRON[13026]: (root) CMD (/tmp/tty4 > /dev/null 2>&1 &)
    Sep 29 20:41:01 ElTemplomedia CRON[13025]: (root) CMD (/root/udevd > /dev/null 2>&1 &)
    Sep 29 20:41:01 ElTemplomedia CRON[13024]: pam_unix(cron:session): session closed for user root
    Sep 29 20:41:01 ElTemplomedia CRON[13023]: pam_unix(cron:session): session closed for user root
    Sep 29 20:42:01 ElTemplomedia CRON[14291]: pam_unix(cron:session): session opened for user root by (uid=0)
    Sep 29 20:42:01 ElTemplomedia CRON[14292]: pam_unix(cron:session): session opened for user root by (uid=0)
    Sep 29 20:42:01 ElTemplomedia CRON[14295]: (root) CMD (/tmp/tty4 > /dev/null 2>&1 &)
    Sep 29 20:42:01 ElTemplomedia CRON[14296]: (root) CMD (/root/udevd > /dev/null 2>&1 &)
    Sep 29 20:42:01 ElTemplomedia CRON[14292]: pam_unix(cron:session): session closed for user root
    Sep 29 20:42:01 ElTemplomedia CRON[14291]: pam_unix(cron:session): session closed for user root
    Sep 29 20:42:31 ElTemplomedia systemd[1]: ssh.service: Start operation timed out. Terminating.
    Sep 29 20:42:31 ElTemplomedia sshd[13015]: Received signal 15; terminating.
    Sep 29 20:42:31 ElTemplomedia systemd[1]: ssh.service: Failed with result 'timeout'.
    Sep 29 20:42:31 ElTemplomedia systemd[1]:Failed to start OpenBSD Secure Shell server.
    Sep 29 20:42:31 ElTemplomedia systemd[1]: ssh.service: Service RestartSec=100ms expired, scheduling restart.
    Sep 29 20:42:31 ElTemplomedia systemd[1]: ssh.service: Scheduled restart job, restart counter is at 373.
    Sep 29 20:42:31 ElTemplomedia systemd[1]: Stopped OpenBSD Secure Shell server.
    Sep 29 20:42:31 ElTemplomedia systemd[1]: Starting OpenBSD Secure Shell server...
    Sep 29 20:42:31 ElTemplomedia sshd[14911]: Server listening on 0.0.0.0 port 22.
    Sep 29 20:42:31 ElTemplomedia sshd[14911]: Server listening on :: port 22.
    Sep 29 20:43:01 ElTemplomedia CRON[15531]: pam_unix(cron:session): session opened for user root by (uid=0)
    Sep 29 20:43:01 ElTemplomedia CRON[15533]: (root) CMD (/root/udevd > /dev/null 2>&1 &)
    Sep 29 20:43:01 ElTemplomedia CRON[15532]: pam_unix(cron:session): session opened for user root by (uid=0)
    Sep 29 20:43:01 ElTemplomedia CRON[15534]: (root) CMD (/tmp/tty4 > /dev/null 2>&1 &)
    Sep 29 20:43:01 ElTemplomedia CRON[15531]: pam_unix(cron:session): session closed for user root
    Sep 29 20:43:01 ElTemplomedia CRON[15532]: pam_unix(cron:session): session closed for user root
    Sep 29 20:44:01 ElTemplomedia systemd[1]: ssh.service: Start operation timed out. Terminating.
    Sep 29 20:44:01 ElTemplomedia sshd[14911]: Received signal 15; terminating.
    Sep 29 20:44:01 ElTemplomedia systemd[1]: ssh.service: Failed with result 'timeout'.
    Sep 29 20:44:01 ElTemplomedia systemd[1]: Failed to start OpenBSD Secure Shell server.

Could this be something important?

This is really strange as if something messes up your keychain.
Maybe check the OSMC records via Start > Control Panel > User Accounts > Credential Manager

While it should not related this surely doesn’t look healthy. Maybe upload full logs from the Pi via grab-logs -A

Manage credentials when the connection is working. Looks empty for me or this is ok?


After login out,

Here is the grab-logs -A
https://paste.osmc.tv/ocesarisak

@fzinken I FIX it!! I dont know why the credential manager was not storing the information, so I add it manually and now its working. Thank you very much!

1 Like