Samba is not working

You need to fix your DNS.
Then you can update OSMC properly.

Until you attempt to update OSMC properly, Samba will be broken, if the package upstream was (for a brief period) broken

Facepalm…

Double facepalm…

You are having the issue because you are not completely updated. The update has failed to complete because you have a name resolution issue (not necessarily inside your lan, likely outside) that is not allowing you to obtain the complete update.

Set the DNS server on your OSMC device to 8.8.8.8 then reboot and reattempt the update.

I launched the suggested commands:

osmc@osmc3:~$ sudo apt-get update && sudo apt-get dist-upgrade

Ign http://ftp.debian.org jessie InRelease
Trovato http://security.debian.org jessie/updates InRelease
Scaricamento di:1 http://ftp.debian.org jessie-updates InRelease [145 kB]
Trovato http://ftp.debian.org jessie Release.gpg                                         
Trovato http://ftp.debian.org jessie Release             
Trovato http://security.debian.org jessie/updates/main armhf Packages              
Scaricamento di:2 http://ftp.debian.org jessie-updates/main armhf Packages/DiffIndex [6.916 B]     
Trovato http://security.debian.org jessie/updates/contrib armhf Packages                                                           
Scaricamento di:3 http://ftp.debian.org jessie-updates/contrib armhf Packages [32 B]               
Scaricamento di:4 http://ftp.debian.org jessie-updates/non-free armhf Packages/DiffIndex [736 B]                               
Scaricamento di:5 http://ftp.debian.org jessie-updates/contrib Translation-en [14 B]               
Scaricamento di:6 http://ftp.debian.org jessie-updates/main Translation-en/DiffIndex [2.704 B]     
Trovato http://security.debian.org jessie/updates/non-free armhf Packages                          
Trovato http://security.debian.org jessie/updates/contrib Translation-en                           
Trovato http://security.debian.org jessie/updates/main Translation-en                              
Trovato http://security.debian.org jessie/updates/non-free Translation-en                          
Scaricamento di:7 http://ftp.debian.org jessie-updates/non-free Translation-en/DiffIndex [736 B]   
Trovato http://ftp.debian.org jessie/main armhf Packages                      
Trovato http://ftp.debian.org jessie/contrib armhf Packages                   
Trovato http://ftp.debian.org jessie/non-free armhf Packages                  
Trovato http://ftp.debian.org jessie/contrib Translation-en             
Trovato http://ftp.debian.org jessie/main Translation-it
Trovato http://ftp.debian.org jessie/main Translation-en
Trovato http://ftp.debian.org jessie/non-free Translation-en
Trovato http://apt.osmc.tv jessie InRelease        
Scaricamento di:8 http://apt.osmc.tv jessie/main armhf Packages/DiffIndex [2.023 B]
Ign http://apt.osmc.tv jessie/main Translation-it_IT                                                                                       
Ign http://apt.osmc.tv jessie/main Translation-it                                                                                          
Ign http://apt.osmc.tv jessie/main Translation-en                                                                                          
Recuperati 158 kB in 10s (14,7 kB/s)                                                                                                       
Lettura elenco dei pacchetti... Fatto
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze       
Lettura informazioni sullo stato... Fatto
Calcolo dell'aggiornamento... I seguenti pacchetti sono stati installati automaticamente e non sono più richiesti:
  libass5 libenca0 python-colorama python-distlib python-html5lib
Usare "apt-get autoremove" per rimuoverli.
Eseguito
0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati.

The output is in italian, it says that no packages has been updated, installed, removed or not updated.

I restarted the samba daemon, but the issue is still present. If I try to connect to one of the shares, I get the same errors in the /var/log/samba/log.smbd

[2016/12/27 18:55:45.521888,  0] ../lib/util/fault.c:78(fault_report)
  ===============================================================
[2016/12/27 18:55:45.525473,  0] ../lib/util/fault.c:79(fault_report)
  INTERNAL ERROR: Signal 11 in pid 6367 (4.2.14-Debian)
  Please read the Trouble-Shooting section of the Samba HOWTO
[2016/12/27 18:55:45.530513,  0] ../lib/util/fault.c:81(fault_report)
  ===============================================================
[2016/12/27 18:55:45.530739,  0] ../source3/lib/util.c:788(smb_panic_s3)
  PANIC (pid 6367): internal error
[2016/12/27 18:55:45.531590,  0] ../source3/lib/util.c:899(log_stack_trace)
  BACKTRACE: 0 stack frames:
[2016/12/27 18:55:45.531834,  0] ../source3/lib/dumpcore.c:318(dump_core)
  dumping core in /var/log/samba/cores/smbd

Here are the logs:
http://paste.osmc.io/vobodehuzu

Is there any more test I can run to address this issue?

I managed to fix the problem on my Pi3. I connected through SSH and then ran the following commands:

sudo -s
apt-get remove --purge samba smbclient libsmbclient
apt-get update
apt-get -f install
apt-get install samba smbclient libsmbclient
apt-get dist-upgrade && reboot

After I did that, OSMC booted correctly and Samba was working again. I hope this helps (?)

EDIT: I corrected the code and also I realized that installing Samba through “My OSMC” once again ruins it for me. I take it it’s something about that package (?). Though I’m pretty sure what the posts after mine mean x3

Fye’s solution worked for me but remember to use sudo.
Here’s what I did:
sudo apt-get remove --purge samba smbclient libsmbclient
sudo apt-get -f install
sudo apt-get update
sudo apt-get install samba smbclient libsmbclient
sudo apt-get dist-upgrade && reboot
After OSMC restarted everything was back to normal.

Your above commands will remove smb-app-osmc. We can verify that the configuration changes introduced by that package seem to cause some problems.

Something for us to look in to.

CC @DBMandrake

Having similar issues accessing a Pi2 (OSMC) from a model b+ (raspbian) only occurred after christmas update. cifs settings in fstab no longer mount on bootup mount -a hangs as does mounting individually with mount command in terminal

from logs, only suspect things (in my limited experience) samba related are:

insserv: warning: current start runlevel(s) (empty) of script `smbd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `smbd' overrides LSB defaults (0 1 6).
insserv: warning: current start runlevel(s) (empty) of script `nmbd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `nmbd' overrides LSB defaults (0 1 6).
insserv: warning: current start runlevel(s) (empty) of script `samba-ad-dc' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `samba-ad-dc' overrides LSB defaults (0 1 6).

Dec 28 16:14:49 CotsyOSMC systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)...
Dec 28 16:14:49 CotsyOSMC udisks-glue[404]: net usershare add: cannot convert name "CotsyOSMC\osmc" to a SID. The connection was refused. Maybe smbd is not running.

Dec 28 16:15:21 CotsyOSMC smbd[866]: [2016/12/28 16:15:21.617496,  0] ../lib/util/fault.c:78(fault_report)
Dec 28 16:15:21 CotsyOSMC smbd[866]: ===============================================================
Dec 28 16:15:21 CotsyOSMC smbd[866]: [2016/12/28 16:15:21.626885,  0] ../lib/util/fault.c:79(fault_report)
Dec 28 16:15:21 CotsyOSMC smbd[866]: INTERNAL ERROR: Signal 11 in pid 866 (4.2.14-Debian)
Dec 28 16:15:21 CotsyOSMC smbd[866]: Please read the Trouble-Shooting section of the Samba HOWTO
Dec 28 16:15:21 CotsyOSMC smbd[866]: [2016/12/28 16:15:21.627608,  0] ../lib/util/fault.c:81(fault_report)
Dec 28 16:15:21 CotsyOSMC smbd[866]: ===============================================================
Dec 28 16:15:21 CotsyOSMC smbd[866]: [2016/12/28 16:15:21.627779,  0] ../source3/lib/util.c:788(smb_panic_s3)
Dec 28 16:15:21 CotsyOSMC smbd[866]: PANIC (pid 866): internal error
Dec 28 16:15:21 CotsyOSMC smbd[866]: [2016/12/28 16:15:21.629532,  0] ../source3/lib/util.c:899(log_stack_trace)
Dec 28 16:15:21 CotsyOSMC smbd[866]: BACKTRACE: 0 stack frames:
Dec 28 16:15:21 CotsyOSMC smbd[866]: [2016/12/28 16:15:21.630504,  0] ../source3/lib/dumpcore.c:318(dump_core)
Dec 28 16:15:21 CotsyOSMC smbd[866]: dumping core in /var/log/samba/cores/smbd
Dec 28 16:15:25 CotsyOSMC smbd[872]: [2016/12/28 16:15:25.099361,  0] ../lib/util/fault.c:78(fault_report)
Dec 28 16:15:25 CotsyOSMC smbd[872]: ===============================================================
Dec 28 16:15:25 CotsyOSMC smbd[872]: [2016/12/28 16:15:25.099761,  0] ../lib/util/fault.c:79(fault_report)
Dec 28 16:15:25 CotsyOSMC smbd[872]: INTERNAL ERROR: Signal 11 in pid 872 (4.2.14-Debian)
Dec 28 16:15:25 CotsyOSMC smbd[872]: Please read the Trouble-Shooting section of the Samba HOWTO
Dec 28 16:15:25 CotsyOSMC smbd[872]: [2016/12/28 16:15:25.099982,  0] ../lib/util/fault.c:81(fault_report)
Dec 28 16:15:25 CotsyOSMC smbd[872]: ===============================================================
Dec 28 16:15:25 CotsyOSMC smbd[872]: [2016/12/28 16:15:25.100119,  0] ../source3/lib/util.c:788(smb_panic_s3)
Dec 28 16:15:25 CotsyOSMC smbd[872]: PANIC (pid 872): internal error
Dec 28 16:15:25 CotsyOSMC smbd[872]: [2016/12/28 16:15:25.100880,  0] ../source3/lib/util.c:899(log_stack_trace)
Dec 28 16:15:25 CotsyOSMC smbd[872]: BACKTRACE: 0 stack frames:
Dec 28 16:15:25 CotsyOSMC smbd[872]: [2016/12/28 16:15:25.101304,  0] ../source3/lib/dumpcore.c:318(dump_core)
Dec 28 16:15:25 CotsyOSMC smbd[872]: dumping core in /var/log/samba/cores/smbd
Dec 28 16:15:25 CotsyOSMC smbd[872]: Dec 28 16:15:36 CotsyOSMC smbd[904]: [2016/12/28 16:15:36.993474,  0] ../lib/util/fault.c:78(fault_report)
Dec 28 16:15:36 CotsyOSMC smbd[904]: ===============================================================
Dec 28 16:15:36 CotsyOSMC smbd[904]: [2016/12/28 16:15:36.994159,  0] ../lib/util/fault.c:79(fault_report)
Dec 28 16:15:36 CotsyOSMC smbd[904]: INTERNAL ERROR: Signal 11 in pid 904 (4.2.14-Debian)
Dec 28 16:15:36 CotsyOSMC smbd[904]: Please read the Trouble-Shooting section of the Samba HOWTO
Dec 28 16:15:36 CotsyOSMC smbd[904]: [2016/12/28 16:15:36.994506,  0] ../lib/util/fault.c:81(fault_report)
Dec 28 16:15:36 CotsyOSMC smbd[904]: ===============================================================
Dec 28 16:15:36 CotsyOSMC smbd[904]: [2016/12/28 16:15:36.994708,  0] ../source3/lib/util.c:788(smb_panic_s3)
Dec 28 16:15:36 CotsyOSMC smbd[904]: PANIC (pid 904): internal error
Dec 28 16:15:36 CotsyOSMC smbd[904]: [2016/12/28 16:15:36.995977,  0] ../source3/lib/util.c:899(log_stack_trace)
Dec 28 16:15:36 CotsyOSMC smbd[904]: BACKTRACE: 0 stack frames:
Dec 28 16:15:36 CotsyOSMC smbd[904]: [2016/12/28 16:15:36.996616,  0] ../source3/lib/dumpcore.c:318(dump_core)
Dec 28 16:15:36 CotsyOSMC smbd[904]: dumping core in /var/log/samba/cores/smbd
Dec 28 16:15:37 CotsyOSMC smbd[904]: 
Dec 28 16:15:37 CotsyOSMC smbd[906]: [2016/12/28 16:15:37.022881,  0] ../source3/lib/sharesec.c:422(delete_share_security)
Dec 28 16:15:37 CotsyOSMC smbd[906]: delete_share_security: Failed to delete entry for share new: NT_STATUS_NOT_FOUND
Dec 28 16:15:37 CotsyOSMC smbd[905]: [2016/12/28 16:15:37.023522,  0] ../lib/util/fault.c:78(fault_report)
Dec 28 16:15:37 CotsyOSMC smbd[905]: ===============================================================
Dec 28 16:15:37 CotsyOSMC smbd[905]: [2016/12/28 16:15:37.023812,  0] ../lib/util/fault.c:79(fault_report)
Dec 28 16:15:37 CotsyOSMC smbd[905]: INTERNAL ERROR: Signal 11 in pid 905 (4.2.14-Debian)
Dec 28 16:15:37 CotsyOSMC smbd[906]: [2016/12/28 16:15:37.025304,  0] ../lib/util/fault.c:78(fault_report)
Dec 28 16:15:37 CotsyOSMC smbd[905]: Please read the Trouble-Shooting section of the Samba HOWTO
Dec 28 16:15:37 CotsyOSMC smbd[906]: ===============================================================
Dec 28 16:15:37 CotsyOSMC smbd[905]: [2016/12/28 16:15:37.032161,  0] ../lib/util/fault.c:81(fault_report)
Dec 28 16:15:37 CotsyOSMC smbd[906]: [2016/12/28 16:15:37.034874,  0] ../lib/util/fault.c:79(fault_report)
Dec 28 16:15:37 CotsyOSMC smbd[905]: ===============================================================
Dec 28 16:15:37 CotsyOSMC smbd[906]: INTERNAL ERROR: Signal 11 in pid 906 (4.2.14-Debian)
Dec 28 16:15:37 CotsyOSMC smbd[905]: [2016/12/28 16:15:37.043732,  0] ../source3/lib/util.c:788(smb_panic_s3)
Dec 28 16:15:37 CotsyOSMC smbd[906]: Please read the Trouble-Shooting section of the Samba HOWTO
Dec 28 16:15:37 CotsyOSMC smbd[905]: PANIC (pid 905): internal error
Dec 28 16:15:37 CotsyOSMC smbd[906]: [2016/12/28 16:15:37.052924,  0] ../lib/util/fault.c:81(fault_report)
Dec 28 16:15:37 CotsyOSMC smbd[905]: [2016/12/28 16:15:37.056435,  0] ../source3/lib/util.c:899(log_stack_trace)
Dec 28 16:15:37 CotsyOSMC smbd[906]: ===============================================================
Dec 28 16:15:37 CotsyOSMC smbd[905]: BACKTRACE: 0 stack frames:
Dec 28 16:15:37 CotsyOSMC smbd[906]: [2016/12/28 16:15:37.068678,  0] ../source3/lib/util.c:788(smb_panic_s3)
Dec 28 16:15:37 CotsyOSMC smbd[905]: [2016/12/28 16:15:37.070987,  0] ../source3/lib/dumpcore.c:318(dump_core)
Dec 28 16:15:37 CotsyOSMC smbd[906]: PANIC (pid 906): internal error
Dec 28 16:15:37 CotsyOSMC smbd[905]: dumping core in /var/log/samba/cores/smbd
Dec 28 16:15:37 CotsyOSMC smbd[906]: [2016/12/28 16:15:37.082730,  0] ../source3/lib/util.c:899(log_stack_trace)
Dec 28 16:15:37 CotsyOSMC smbd[905]: 
Dec 28 16:15:37 CotsyOSMC smbd[906]: BACKTRACE: 0 stack frames:
Dec 28 16:15:37 CotsyOSMC smbd[906]: [2016/12/28 16:15:37.103657,  0] ../source3/lib/dumpcore.c:318(dump_core)
Dec 28 16:15:37 CotsyOSMC smbd[906]: dumping core in /var/log/samba/cores/smbd
Dec 28 16:15:37 CotsyOSMC smbd[906]: 

have attempted update and dist-upgrade to no avail, should I attempt purge and reinstall of samba as posted above?

You could try to:

cd /etc/samba
sudo cp smb.conf smb.conf.osmc
sudo cp smb.conf.distributed smb.conf
sudo systemctl restart samba

and see if that solves the issue temporarily

2 Likes

Worked a charm, thanks a bundle mate it was really starting to annoy me.
Have A great new year

good to know, just keep an eye on the topic when Sam might distribute a updated version of smb-apps-osmc

I will wait then for an “official” response from Sam regarding this: I prefer to keep using the OSMC-provided samba if possible :slight_smile:

as would I, though the only thing I have altered is the .conf file. This is, I assume, easily restored from the backup fzinken directed me to create. So I am happy enough until Sam works it out

What did you change in the conf file to get it working?

Unfortunately I can’t replicate this problem here, so I am hoping someone with a bit of time can go through the file and find the offending setting which is causing the issue. Then we can fix the issue for all users.

Sorry, altered was a poor choice of words, swapped would be more accurate.
As fzinken suggested I backed up smb.conf to smb.conf.osmc
then copied smb.conf.distributed as smb.conf

Got you.

We need to find the culprit in the configuration file we distribute (with some trial and error, no doubt), then I can fix the issue for all users.

ok, did some poking in the original smb.conf and found if I comment this line out:
# usershare template share = automount template
mounting via fstab works again
don’t know where to go from there, hope that sheds some light?
let me know if there’s another file I can poke around in

2 Likes

Thanks for narrowing that down.

@fzinken Can you confirm if this resolves the issue for you?

The automounting of shares via SMB was written by @DBMandrake. I’ll need to catch up with him on this and discuss the significance of this. But it’s Christmas and he is a bit busy lately, so it might be a little while until I get a chance to talk to him about this.

Thanks again for the investigative work. I’ll work on reproducing this locally.

Sam

Yes, just commenting that out makes it work

1 Like

This worked also for me!

I commented that line as @Spasmodean suggested, and now everything is working as usual again.

Thanks!