Debian 9: "Unit samba.service is masked"

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
peter_b
Chatterbox
Posts: 370
Joined: Tue Nov 12, 2013 2:05 am

Debian 9: "Unit samba.service is masked"

Post by peter_b »

[PROBLEM]
Trying to start samba service on Debian 9 (Stretch) with systemctl:

Code: Select all

$ systemctl start samba
Returns this error message:
Failed to start samba.service: Unit samba.service is masked.
Systemctl status gives me:
● samba.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)

[SOLUTION]
I always fall into this trap on Debian systems! :oops: :evil:
You can start the services as "smbd" and "nmbd" - not "samba".

Listing the services in "/lib/systemd/system" shows that "samba.service" is grounded to nowhere:

Code: Select all

lrwxrwxrwx 1 root root   9 Jan 31 23:12 /lib/systemd/system/samba.service -> /dev/null
-rw-r--r-- 1 root root 385 Jan 31 23:12 /lib/systemd/system/nmbd.service
-rw-r--r-- 1 root root 397 Jan 31 23:12 /lib/systemd/system/smbd.service
Actually, I assume(d) that "samba" service was a nice convenient wrapper to handle smbd/nmbd in one.
I don't know why they've disabled it by default now...

Links:
http://forums.debian.net/viewtopic.php?t=126076
https://askubuntu.com/questions/754572/ ... -is-masked
http://aptosid.com/index.php?name=PNphp ... pic&t=2846
Post Reply