masked
services are when the systemd unit files are linked to /dev/null
/ You can see the sudo.service
$ systemctl status sudo.service
● sudo.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
$ ls -l /lib/systemd/system/sudo.service
lrwxrwxrwx 1 root root 9 Jan 18 2018 /lib/systemd/system/sudo.service -> /dev/null
Some services are used within systemd, and not actual daemons with processes that run in the background. For example, you cannot start/stop halt.service
. But if you place your scripts in /usr/lib/systemd/system-shutdown/
, they will be run before the system is halted or rebooted.
Sudo Usage
You don't need to reboot to use sudo. Simply add users and your settings to the Sudoers file.
sudo.service
is not a "real" service. There isn't any sudo process or daemon running in the background, and you need to restart it to pick up changes to the sudoers file. Ah, I see what you are getting. The other question is clearer on what you are trying to achieve. – hanxue Aug 08 '19 at 12:25