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:~$

- 36,399
-
17.04 is still in development and not officially released yet, so bugs are to expect. Please report them on Launchpad instead of posting a question here. – Byte Commander Dec 03 '16 at 17:36
1 Answers
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 actionremember 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
- Liang Guo (2014-03-06). /etc/init.d/samba forbit systemd shutdown system. 740942. Debian bugs.
- Mask /etc/init.d/samba init script for systemd. Ivo De Decker. 2014-10-24.
- Ivo De Decker (2014-10-24). samba init script should not be started after upgrade. 766690. Debian bugs.
- Ivo De Decker (2014-11-15). samba: unit samba.service is masked. 769714. Debian bugs.
- Wulf C. Krueger (2010).
samba.target