Welcome! Log In Create A New Profile


Samba failed to load with sysvint or systemd

Posted by Ben 
After I installed the latest kernel but before installation of systemd (so it's still sysvint), I tried installing samba but it didn't work. I upgraded from a very old kernel 3.xx but samba used to work fine. I tried re-installation several times with apt-get update/upgrade/dist-upgrade/clean/autoremove/purge/remove, dpkg --clear-avail, dpkg --configure -a. None of them worked for me.

Get:1 http://security.debian.org stretch/updates/main armel samba armel 2:4.5.12+dfsg-2+deb9u2 [870 kB]
Fetched 870 kB in 0s (2094 kB/s)
Selecting previously unselected package samba.
(Reading database ... 24555 files and directories currently installed.)
Preparing to unpack .../samba_2%3a4.5.12+dfsg-2+deb9u2_armel.deb ...
Unpacking samba (2:4.5.12+dfsg-2+deb9u2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for man-db ( ...
Setting up samba (2:4.5.12+dfsg-2+deb9u2) ...
[FAIL] Starting SMB/CIFS daemon: smbd failed!
invoke-rc.d: initscript smbd, action "start" failed.
dpkg: error processing package samba (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

After that, I installed systemd and enabled it with boot, and then I got this

Setting up samba (2:4.5.12+dfsg-2+deb9u2) ...
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript smbd, action "start" failed.
* smbd.service - Samba SMB Daemon
   Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-03-14 10:37:31 PDT; 152ms ago
     Docs: man:smbd(8)
  Process: 689 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 689 (code=exited, status=1/FAILURE)

The log.nmbd just showed
[2018/03/14 00:22:36.958472,  0] ../lib/util/become_daemon.c:124(daemon_ready)
  STATUS=daemon 'nmbd' finished starting up and ready to serve connections
[2018/03/14 00:26:10.398689,  0] ../source3/nmbd/nmbd.c:58(terminate)
  Got SIGTERM: going down...

Note that I ran apt-get update/upgrade before installing systemd. How did you guys load samba daemon successfully?
Ok, I guess it may be a problem of its configure file, smb.conf. If I use the default smb.conf, it can load and run but if I loaded my own smb.conf (which worked with the old system before the kernel upgrade), it failed to load. Here's my smb.conf. I think it's simple.... I don't have the hard drive attached to the pogoplug mobile so I used an USB drive to test it.

root@PogoMob:~# cat /etc/samba/smb.conf
  workgroup = MSHOME
  netbios name = PogoMob
  security = share
  guest account = root
  domain master = yes
  local master = yes
  preferred master = yes
  hosts allow =
  hosts deny =

  comment = Public Folder
  path = /media/flash/
  guest ok = Yes
  read only = No

Ok, some progress. After I change "security" to

security = user

and ran smbpasswd to add a user, the samba daemon started ok but when I tried to connect/log in from Windows, it wouldn't take my user/password. The login window kept popping up when I entered the user name and password.
Ok, I'm answering myself. Adding this line to smf.conf resolved the problem. Now the samba is fully functional ....

ntlm auth = yes

Your Email:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.