Samba share has completely stopped working

[Videos]
path = /var/media/Extern/video
available = yes
browseable = yes
public = yes
writeable = yes
root preexec = mkdir -p /var/media/Extern/video

I created a share that has been working great and suddenly no longer works. I have rebooted the unit but it doesn’t show up. Samba sharing is still enabled in the GUI.

Can someone help me trouble shoot. Thanks.

Seems your disk is not mounted under /var/media/Extern ? You can check that in ssh session with command mount.

The disk is mounted just fine.

I have tried checking the process list for any kind of reference to samba and my mount and it doesn’t show anything.

What’s the command to run the share manually?

I have also tried just browsing the IP of the server and it doesn’t connect.

Check if processes are running

systemctl status smbd -l
systemctl status nmbd -l

check mount

mount

Everything seems ok. Is it possible samba is binding to the wrong network interface and therefore the share isn’t available on the IP address I am browsing?

Just to be clear, I am sharing a folder from my CoreElec server, not trying to mount a samba share from another server.

CoreELEC:~/docker # mount | grep Extern
/dev/sdc1 on /var/media/Extern type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
smbd.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smbd.service; enabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2021-08-30 20:47:51 CEST; 627ms ago
  Process: 11009 ExecStart=/usr/sbin/smbd (code=exited, status=0/SUCCESS)
 Main PID: 11026 (code=exited, status=1/FAILURE)

Is it really to hard to copy/paste everything the command returns? Why do we have to guessing all the time…

Seems your smbd.service is restarting for some reason.
Run this four commands and copy everything from console.

systemctl restart nmbd
systemctl restart smbd
systemctl status nmbd -l
systemctl status smbd -l

I am working from Windows in gitbash and it’s difficult to copy out everything. I only tried to provide what was relevant.

Here is smbd output

● nmbd.service - Samba NMB Daemon
● nmbd.service - Samba NMB Daemon
● smbd.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smbd.service; enabled; vendor preset: disabled)
   Active: activating (start) since Mon 2021-08-30 21:04:15 CEST; 136ms ago
Cntrl PID: 15494 (smbd)
    Tasks: 1 (limit: 3953)
   Memory: 1.3M
   CGroup: /system.slice/smbd.service
           ├─15494 [smbd]
           └─15514 /usr/sbin/smbd

Aug 30 21:04:15 CoreELEC systemd[1]: Starting Samba SMB Daemon...
Aug 30 21:04:15 CoreELEC systemd[1]: Started Samba SMB Daemon.

And here is the other

mbd.service - Samba NMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/nmbd.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2021-08-30 21:01:55 CEST; 4min 3s ago
  Process: 13389 ExecStart=/usr/sbin/nmbd (code=exited, status=0/SUCCESS)
 Main PID: 13405 (nmbd)
    Tasks: 1 (limit: 3953)
   Memory: 1.6M
   CGroup: /system.slice/nmbd.service
           └─13405 /usr/sbin/nmbd

Aug 30 21:02:17 CoreELEC nmbd[13405]:
Aug 30 21:02:17 CoreELEC nmbd[13405]:   Samba name server COREELEC is now a local master browser for workgroup WORKGROUP on subnet 172.20.0.1
Aug 30 21:02:17 CoreELEC nmbd[13405]:
Aug 30 21:02:17 CoreELEC nmbd[13405]:   *****
Aug 30 21:02:17 CoreELEC nmbd[13405]: [2021/08/30 21:02:17.771544,  0] ../source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
Aug 30 21:02:17 CoreELEC nmbd[13405]:   *****
Aug 30 21:02:17 CoreELEC nmbd[13405]:
Aug 30 21:02:17 CoreELEC nmbd[13405]:   Samba name server COREELEC is now a local master browser for workgroup WORKGROUP on subnet 172.31.0.1
Aug 30 21:02:17 CoreELEC nmbd[13405]:
Aug 30 21:02:17 CoreELEC nmbd[13405]:   *****

It looks like it’s using the ip addresses from my docker interfaces…am I correct? It should be using 192.168.0.138 , the server ip-

You can try to bind to one interface only.
https://wiki.samba.org/index.php/Configure_Samba_to_Bind_to_Specific_Interfaces

No it’s still not working. I have tried clearing the windows credentials and logging in with nobody/nobody and no connection.

I also have this shared connected on another server with a Docker mount and the container cannot mount the share.

I removed the share from the sama.conf since I have the option in Kodi to “share all external media automatically” but still no dice.

I have run the testparm command and get the following

# Global parameters
[global]
        bind interfaces only = Yes
        deadtime = 30
        enable core files = No
        guest account = root
        interfaces = lo eth0
        load printers = No
        map to guest = Bad User
        min receivefile size = 16384
        name resolve order = host bcast
        passdb backend = smbpasswd
        printcap name = /dev/null
        security = USER
        server min protocol = SMB2
        server string = CoreELEC
        socket options = TCP_NODELAY IPTOS_LOWDELAY
        fruit:model = Xserve
        idmap config * : backend = tdb
        aio read size = 16384
        aio write size = 16384
        allocation roundup size = 0
        mangled names = no
        smb encrypt = No
        use sendfile = Yes


[Update]
        guest ok = Yes
        path = /storage/.update
        root preexec = mkdir -p /storage/.update


[Extern]
        guest ok = Yes
        path = /media/Extern

\192.168.0.138\Extern should be viewable.

Do you see any other share like Downloads or nothing?
Try to remove samba.conf, reboot and check if other shares are visible.

I have removed the config and rebooted and rebooted the router as well.

According to testparm all the default shares are now remade but it still won’t connect.

I have tried to mount the share internally just to test if it’s a network problem and I get “connection refused” when trying to mount any correct share listed in conf.

mount //192.168.0.138/Downloads /storage/smb/test -o username=nobody,password=nobody

I have tried giving the root username and password as well but still doesn’t work.

Seems that the samba service is working but refusing connections.

I have tried resetting iptables and even disabling but doesn’t help.

Your smb.conf looks different than the default one. use this template and it have to work:

If not your Windows system has a problem. MAye you used a “old” conf from from a prior samba version.
If this still does not work make a complete fresh clean install and try if the default shares can be accessed or not.

That file doesn’t help either.

I am not using an old conf. besides, the config is regenerated in /var/samba when I remove the .config config-

The share is not connectable from my Raspberry PI either, so it rules out being just a windows problem. Like I said in my previous post, I cannot even locally mount the share inside CoreElec.

I guess I will have to try a reinstall of the OS.

I have installed the latest RC3 for my unit on a USB drive and the share was working immediately so maybe I will continue with the RC3 instead.

1 Like

I’m on rc3 build with my tanix tx3.
samba didn’t work too. and the smb.conf is little different from what you post.
I use your conf file and it works! thx!

About | FAQ | Terms of Service | Privacy Policy | Legal Notice