2

I just upgraded my Pi from Jessie to Stretch. I was running Samba on it with no problems before, but now the service won't start - neither on boot nor manually. Log output is below. I have no idea how to solve this (have already tried reinstalling). Has anybody successfully managed to use Samba on Stretch? How did you do it?

$ sudo systemctl restart smbd.service
Job for smbd.service failed. See 'systemctl status smbd.service' and 'journalctl -xn' for details.
$ sudo journalctl -xn
-- Logs begin at Mon 2017-11-13 20:54:11 CET, end at Mon 2017-11-13 21:21:56 CET. --
Nov 13 21:20:08 raspberrypi systemd[1]: Starting Samba SMB Daemon...
-- Subject: Unit smbd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit smbd.service has begun starting up.
Nov 13 21:20:55 raspberrypi systemd[1]: smbd.service: main process exited, code=dumped, status=11/SEGV
Nov 13 21:20:55 raspberrypi systemd[1]: Failed to start Samba SMB Daemon.
-- Subject: Unit smbd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit smbd.service has failed.
--
-- The result is failed.
Nov 13 21:20:55 raspberrypi systemd[1]: Unit smbd.service entered failed state.
Nov 13 21:20:55 raspberrypi sudo[6816]: pam_unix(sudo:session): session closed for user root
Nov 13 21:21:15 raspberrypi sudo[7119]: enno : TTY=pts/0 ; PWD=/home/enno ; USER=root ; COMMAND=/bin/journalctl -xn
Nov 13 21:21:16 raspberrypi sudo[7119]: pam_unix(sudo:session): session opened for user root by enno(uid=0)
Nov 13 21:21:39 raspberrypi sudo[7119]: pam_unix(sudo:session): session closed for user root
Nov 13 21:21:55 raspberrypi sudo[7379]: enno : TTY=pts/0 ; PWD=/home/enno ; USER=root ; COMMAND=/bin/journalctl -xn
Nov 13 21:21:56 raspberrypi sudo[7379]: pam_unix(sudo:session): session opened for user root by enno(uid=0)

$ systemctl status smbd.service
? smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled)
   Active: failed (Result: core-dump) since Mon 2017-11-13 21:20:55 CET; 1min 48s ago
     Docs: man:smbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 6868 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=dumped, signal=SEGV)
 Main PID: 6868 (code=dumped, signal=SEGV)
2
  • Welcome, Enno of HtF fame! Yes, samba works as expected for me on Stretch after sudo apt install samba; sudo smbpasswd -a pi then accessing the share from the network. Can you edit your post to state whether there are any clues in /var/log/samba/log.smbd? If possible could you obtain the core dump, run with gdb -core, and see if there's anything useful in the backtrace?
    – jdonald
    Dec 1 '17 at 5:36
  • Hi! I did all of those things, and they provided me with some clues, but eventually it turned out that my upgrade had just gone wrong. I've posted an answer to my own question below.
    – Enno
    Dec 2 '17 at 10:10
2

After a lot more googling, it seems that this was caused by a combination of two issues. First, my Samba package was being held back by apt at the version from Jessie. Second, that version has a bug in combination with a later version of a shared library that was upgraded. The fix was to make sure all packages got installed in their Stretch versions. I now have working Samba on Raspbian Stretch, and this is likely not an issue that anybody else will ever have.

Not the answer you're looking for? Browse other questions tagged or ask your own question.