117

When I try to restart Samba, I am receiving the following error message:

Failed to start samba.service: Unit samba.service is masked.

In addition, when I run systemctl, it shows smbd.service in red showing failed.

At the same time restart began to fail, I have lost the share ability in folders created and cannot access. Any help would be appreciated!!!

4 Answers4

168

Debian and debian-derivatives changed the service name from 'samba' to 'smbd'.

Try service smbd restart.

GDorn
  • 1,774
48

Try:

sudo systemctl unmask samba
sudo systemctl enable samba
sudo systemctl restart samba
5

This works for me(Ubuntu server 16):

sudo rm /lib/systemd/system/samba.service 
sudo systemctl enable samba.service nmbd.service
sudo systemctl start samba

Found it from here

Fangxing
  • 281
3

I had the same problem for no apparent reason. Checking the logs I saw that Samba had problems with cached files (improper permissions). rm -R /var/cache/samba/* did the trick.

Tox
  • 131