0
corrado@corrado-zesty2:~$ sudo service samba start
[sudo] password for corrado: 
Failed to start samba.service: Unit samba.service is masked.
corrado@corrado-zesty2:~$ sudo systemctl unmask samba.service
corrado@corrado-zesty2:~$ sudo service samba start
Failed to start samba.service: Unit samba.service is masked.
corrado@corrado-zesty2:~$ sudo apt-get install samba
Reading package lists... Done
Building dependency tree       
Reading state information... Done
samba is already the newest version (2:4.4.5+dfsg-2ubuntu6).
0 upgraded, 0 newly installed, 0 to remove and 108 not upgraded.
corrado@corrado-zesty2:~$ inxi 
CPU~Dual core Intel Core i3-4130 (-HT-MCP-) speed/max~802/3400 MHz Kernel~4.9.0-1-generic x86_64 Up~1:08 Mem~998.4/7862.7MB HDD~1000.2GB(1.6% used) Procs~232 Client~Shell inxi~2.3.4  
corrado@corrado-zesty2:~$ uname -a
Linux corrado-zesty2 4.9.0-1-generic #2-Ubuntu SMP Mon Nov 14 21:43:10 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
corrado@corrado-zesty2:~$ 
waltinator
  • 36,399

1 Answers1

1

As I have said before:

This is not a bug.

What you describe is intentional on the parts of the Debian people.

You are not supposed to control samba services this way on a Debian/Ubuntu systemd operating system. You are supposed to manipulate the smbd, nmbd, and samba-ad-dc services as needed.

There is no umbrella samba.target to do the original job of the old Debian/Ubuntu samba van Smoorenburg rc script; which was starting/stopping these three en bloc. Other people created them, for other systemd operating systems. The Debian people did not.

So where you read Debian/Ubuntu doco saying things like

service samba action
remember that that is not an available thing any more, now that Debian Linux and Ubuntu Linux are systemd operating systems.

Just to add to the confusion …

What the rest of the world outwith Debian knows as samba.service is called samba-ad-dc.service in the Debian world. Similarly, nmbd.service and smbd.service are originally nmb.service and smb.service outwith Debian.

So where you read generic systemd operating system doco about samba talking about nmb, smb, and samba services, you must mentally perform the translation for Debian/Ubuntu, particularly for the latter name.

Further reading

JdeBP
  • 3,959