5

I'm having issues starting samba on boot on Debian Jessie. I do not understand how to do it as it seems that the samba script wrapper is deliberately made not to work.

I tried to issue a update-rc.d samba defaults but it will not modify the system configuration to start at boot.

  • The service will not start at boot even after issuing the update-rc.d command. It seems it is not doing anything – Fabrizio Mazzoni Feb 22 '16 at 6:38
  • Jessie uses systemd. What about systemctl enable samba? – techraf Feb 22 '16 at 6:42
  • update-rc.d: error: samba Default-Start contains no runlevels, aborting. – Fabrizio Mazzoni Feb 22 '16 at 6:43
7

Use the following command to enable samba:

$ sudo systemctl enable smbd.service nmbd.service
Synchronizing state for smbd.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d smbd defaults
Executing /usr/sbin/update-rc.d smbd enable
Synchronizing state for nmbd.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d nmbd defaults
Executing /usr/sbin/update-rc.d nmbd enable
$

and to check:

$ sudo systemctl status smbd
● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
   Loaded: loaded (/etc/init.d/smbd)
   Active: active (running) since Mon 2016-02-22 18:56:27 JST; 12min ago
   CGroup: /system.slice/smbd.service
           ├─3756 /usr/sbin/smbd -D
           └─3771 /usr/sbin/smbd -D

Feb 22 18:56:27 debian smbd[3747]: Starting SMB/CIFS daemon: smbd.
Feb 22 19:03:13 debian smbd[4042]: Reloading /etc/samba/smb.conf: smbd.
$
  • this doesn't work for me; I get active (exited) for both daemons and connection refused when I try smbclient -L localhost -U%. Any thoughts? This is driving me mad. – Hugh Jones May 26 '16 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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