Windows doesn't see samba network share of OSMC

Hi all,

Windows doesn’t see my OSMC smb network share at all. I prefer to use SSH to create an SMB share of a mounted external drive in OSMC. Installing went fine. However, Windows doesn’t see anything and can’t access \\osmc or \\192…

I’m not sure if the shares work at all though if I try to access \\192… from Windows Explorer, it fails immediately instead of waiting for a while. Does anyone know how to troubleshoot this?

Windows%20network%20folder

Short summary of what I did:
installing:
sudo su
apt-get update
apt-get install smb-app-osmc

config:
cd /etc/samba
cp smb.conf smb-local.conf

shares:
nano smb-shares.conf

restart:
service samba restart

test:
testparm
returns “Loaded services file OK.”

Why did you went this way and not just added your shares to smb-shares.conf?
Can you share you smb-local.conf?
What is systemctl status samba giving?
Install smbclient sudo apt-get install smbclient and run smbclient -L localhost
What happens if you type \\<IP of OSMC> into the address line if your windows explorer?

Thanks for your quick reply! I did it this way because that’s how I read it on the internet. I did add a share to smb-shares.conf afterwards but it didn’t change much.

Result of systemctl status samba:

* samba.service - Samba Server
   Loaded: loaded (/lib/systemd/system/samba.service; enabled; vendor preset: enabled)
   Active: active (exited) since Tue 2019-09-03 12:33:23 CEST; 11min ago
  Process: 1612 ExecStop=/etc/init.d/samba.distributed stop (code=exited, status=0/SUCCESS)
  Process: 1914 ExecStart=/etc/init.d/samba.distributed start (code=exited, status=0/SUCCESS)
 Main PID: 1914 (code=exited, status=0/SUCCESS)

Sep 03 12:33:22 osmc systemd[1]: Starting Samba Server...
Sep 03 12:33:22 osmc samba.distributed[1914]: Starting nmbd (via systemctl): nmbd.service.
Sep 03 12:33:23 osmc samba.distributed[1914]: Starting smbd (via systemctl): smbd.service.
Sep 03 12:33:23 osmc systemd[1]: Started Samba Server.

Content of etc/samba/smb-local.conf

[global]

    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

# Automount template disabled to work around a samba bug causing crashes accessing external drives.

    read raw = Yes
    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/

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

Typing \ into the address line of Windows Explorer returns me to the C:\ folder. I used two back slashes (\) btw. To message editor removed one

Result of smbclient -L localhost:

Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.16-Debian]

        Sharename       Type      Comment
        ---------       ----      -------
        osmc            Disk      OSMC Home Directory
        movies          Disk      movies drive
        IPC$            IPC       IPC Service (Samba 4.5.16-Debian)
        EFI             Disk      Auto-mount Volume
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.5.16-Debian]

        Server               Comment
        ---------            -------
        LAPTOP               my laptop
        OSMC                 Samba 4.5.16-Debian

        Workgroup            Master
        ---------            -------
        WORKGROUP            OSMC

When you do that remove you smb-local.conf file.

Sorry I forgot a closing mark, corrected what should be typed.

Looks good so you should have osmc and movies share.

Somehow it doesn’t though. Is that a Windows issue? I did reboot Windows too.

Renaming the smb-local.conf file and restarting samba doesn’t make a difference.

I already tried \\<IP of OSMC>. That’s what I meant with \192… in my first post. It immediately gives an unexpected error. Diagnose doesn’t find a thing (of course)
error%20smb

Some old (2015 | 2016) forum posts say you need to disable SMBv2 or SMBv3 on Windows. Do you know something about that?

That would only be needed to allow network browsing. It should still be possible to connect to OSMC with smb2/3.

I will check some troubleshooting commands later. Or just search the forum for smb and author @fzinken maybe you find some ideas

Thanks. I was just reading and got a friend bringing another laptop. On the same wifi and WORKGROUP, he was able to connect to open the OSMC share. It wasn’t discovered automatically but it was accessible. So, the issue lies in my Windows computer. Both computers only use Windows Defender, so I’m not sure yet where to look.

Expected with SMB1 disabled.
Check if you may still have old credentials stored for the OSMC IP.

Also can compare smb protocol settings with your friend (How to detect, enable and disable SMBv1, SMBv2, and SMBv3 in Windows | Microsoft Learn)

check this, maybe it give you some tips were to look

Not being able to browse/discover is normal with Win10 disabled SMB1. And yes SMB1 should be disabled to avoid security issues.

i couldn’t find the english version of your link of MS :wink: found the dutch version…’

@the_Core do you both had the same win10 version 1803/1709/1809???

Thanks for jumping in.

I have Windows 10 Pro 1903 and the other laptop has Windows 10 Home 1803

SMB1 is disabled on both but my computer has SMB direct too and a slightly newer .NET package: 4.8 instead of 4.7.

I doubt any of that being the issue.
Did you check your credentials store if any records for the OSMC IP or Name?

Yeah, I emptied the credential manager and I also executed net use * /del

What does net use \\192.168.1.150\osmc /user:osmc gives you?

That does work. It asks for a password and validates it correctly.

Hey! And now I can get in the folders. What happened?

The miracles of Windows

Haha, this is great. Just navigating another way and entering the credentials did it.

Do you know why I can’t go to \192… but I can go to \192…\osmc ??

Note that this is * NOT* a 1903 issue… it’s the effect of turning off SMB1 by default due to very legitimate security concerns.

I could be wrong but 1903 appears to have introduced an SMB Direct ‘Feature’ (enabled by default) but this has done little to mitigate the effect of a reduced network view by default.