Page 1 of 1

Debian 9: "Unit samba.service is masked"

PostPosted: Mon Mar 04, 2019 4:13 pm
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