Unable to connect to Samba shares

I have the Samba app installed but it stopped working. I SSH’d into it on my RPi2, and this is what smbstatus gave me:

Samba version 4.2.14-Debian
PID Username Group Machine Protocol Version

Failed to initialize session_global: NT_STATUS_ACCESS_DENIED

Service pid machine Connected at

Failed to initialize session_global: NT_STATUS_ACCESS_DENIED
Failed to traverse sessions: NT_STATUS_ACCESS_DENIED

messaging_dgm_lockfile_create: Could not create lock directory: No such file or directory
messaging_dgm_init: messaging_dgm_create_lockfile failed: No such file or direct ory
No locked files

I posted the response from the smbstatus because I assume that it’s part of, if not the, problem.

Any help is greatly appreciated. Thanks!

You would need to give a bit more information, eg from where to where are you trying to connect?
Also post the outputs of
grab-logs -J
sudo systemctl status samba

I’m trying to connect to the Samba share from a Windows 10 desktop.

Here is the url grab-logs -J gave me:
https://paste.osmc.tv/bafocosuka

Output from second command:
Loaded: loaded (/lib/systemd/system/samba.service; enabled)
Active: failed (Result: exit-code) since Thu 2017-11-02 19:36:57 CDT; 1h 10min ago
Process: 292 ExecStart=/etc/init.d/samba.distributed start (code=exited, status=1/FAILURE)
Main PID: 292 (code=exited, status=1/FAILURE)

Nov 02 19:36:49 osmc systemd[1]: Starting Samba Server…
Nov 02 19:36:57 osmc samba.distributed[292]: Starting nmbd (via systemctl): nmbd.serviceJob for nmbd.service failed. See 'sys…tails.
Nov 02 19:36:57 osmc samba.distributed[292]: failed!
Nov 02 19:36:57 osmc systemd[1]: samba.service: main process exited, code=exited, status=1/FAILURE
Nov 02 19:36:57 osmc systemd[1]: Failed to start Samba Server.
Nov 02 19:36:57 osmc systemd[1]: Unit samba.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

This is really strange as the logfile indcates samba is running while the systemd don’t think so. Maybe it is only the nmdb service crashed.
Nov 02 19:36:57 osmc systemd[1]: Unit samba.service entered failed state.
Nov 02 20:40:59 osmc nmbd[1356]: Samba name server OSMC has stopped being a local master browser for workgroup WORKGROUP on subnet 192.168.1.71

Suggest a couple of tests (please post the outputs:
ps -aux | grep mbd
sudo systemctl restart samba
sudo systemctl status samba
grab-logs -A
cat /etc/samba/smb.conf | paste-log

root 1298 0.0 1.4 29356 11416 ? Ss 19:47 0:00 /usr/sbin/smbd -D
root 1356 0.0 0.5 17840 3920 ? Ss 19:48 0:00 /usr/sbin/nmbd -D
osmc 1529 0.0 0.0 2156 604 pts/0 S+ 21:00 0:00 grep mbd

No output

  • samba.service - Samba Server
    Loaded: loaded (/lib/systemd/system/samba.service; enabled)
    Active: active (exited) since Thu 2017-11-02 21:02:01 CDT; 14s ago
    Process: 1536 ExecStart=/etc/init.d/samba.distributed start (code=exited, status=0/SUCCESS)
    Main PID: 1536 (code=exited, status=0/SUCCESS)

Nov 02 21:02:00 osmc samba.distributed[1536]: Starting nmbd (via systemctl): nmbd.service.
Nov 02 21:02:00 osmc samba.distributed[1536]: Starting smbd (via systemctl): smbd.service.
Nov 02 21:02:01 osmc samba.distributed[1536]: Starting samba-ad-dc (via systemctl): samba-ad-dc.service.
Nov 02 21:02:01 osmc systemd[1]: Started Samba Server.

Logs successfully uploaded.
Logs available at https://paste.osmc.tv/erazipiwog

https://paste.osmc.tv/aguketiseb

Ok now it is running, can you now connect to it?

It’s not appearing Windows Explorer. I tried entering \\IPaddress\osmc in bar at the top and tried adding a network location using that same address and neither changed anything.

So no, I don’t think I’m connecting to it.

Samba browsing (a feature of smbv1) has been disabled due to security concerns. But adding \\IPaddress\ should work.

What is now output of:
sudo systemctl status samba
sudo systemctl status nmbd.service

  • samba.service - Samba Server
    Loaded: loaded (/lib/systemd/system/samba.service; enabled)
    Active: active (exited) since Thu 2017-11-02 21:02:01 CDT; 15min ago
    Process: 1536 ExecStart=/etc/init.d/samba.distributed start (code=exited, status=0/SUCCESS)
    Main PID: 1536 (code=exited, status=0/SUCCESS)

Nov 02 21:02:00 osmc samba.distributed[1536]: Starting nmbd (via systemctl): nmbd.service.
Nov 02 21:02:00 osmc samba.distributed[1536]: Starting smbd (via systemctl): smbd.service.
Nov 02 21:02:01 osmc samba.distributed[1536]: Starting samba-ad-dc (via systemctl): samba-ad-dc.service.
Nov 02 21:02:01 osmc systemd[1]: Started Samba Server.

  • nmbd.service - LSB: start Samba NetBIOS nameserver (nmbd)
    Loaded: loaded (/etc/init.d/nmbd)
    Active: active (running) since Thu 2017-11-02 19:48:25 CDT; 1h 29min ago
    Process: 1345 ExecStart=/etc/init.d/nmbd start (code=exited, status=0/SUCCESS)
    CGroup: /system.slice/nmbd.service
    `-1356 /usr/sbin/nmbd -D

Nov 02 21:16:59 osmc nmbd[1356]:
Nov 02 21:16:59 osmc nmbd[1356]: Samba name server OSMC has stopped being a local master browser for workgroup WORKGROUP on…168.1.71
Nov 02 21:16:59 osmc nmbd[1356]:
Nov 02 21:16:59 osmc nmbd[1356]: *****
Nov 02 21:17:17 osmc nmbd[1356]: [2017/11/02 21:17:17.000098, 0] …/source3/nmbd/nmbd_become_lmb.c:397(become_local_master_stage2)
Nov 02 21:17:17 osmc nmbd[1356]: *****
Nov 02 21:17:17 osmc nmbd[1356]:
Nov 02 21:17:17 osmc nmbd[1356]: Samba name server OSMC is now a local master browser for workgroup WORKGROUP on subnet 192.168.1.71
Nov 02 21:17:17 osmc nmbd[1356]:
Nov 02 21:17:17 osmc nmbd[1356]: *****
Hint: Some lines were ellipsized, use -l to show in full.

Still looks good and you are sure that \\192.168.1.71 doesn’t work?
How about on Win10 on command line run net view \\192.168.1.71

I get told that “Windows cannot access \\192.168.1.71” when entering that address into the bar at the top of Windows explorer.

net view \\192.168.1.71 returns:
System error 53 has occurred.

The network path was not found.

Really strange, let’s take another look at the log file
grab-logs -J

Logs successfully uploaded.
Logs available at https://paste.osmc.tv/ujolukumut

Does this have anything to do with this line in the log:

Looks all ok, sorry I am out of ideas just now

Well thanks man, I appreciate you trying!

Maybe someone else will be able to help me out!

Normally that should be OK as you only can have one master and that role is always being negotiated.
The strange part is that you nmdb earlier failed to start while now it is working while you still can not connect

This may be a silly question, but from the Win10 system can you:

ping 192.168.1.71

Yes, I can ping it, and I am also currently SSH’d into it as well.

I know you were SSHed in, but didn’t know if you were using IP or name. Sometimes the simple things can bite you :smiley:

Oh alright lol. Yeah, I’m completely stumped. It just stopped working like last week for some reason.