2

On an Ubuntu 20.04 installation, how can I find out, why some services got masked? There's only answers about specific services, but I can't find any info about how to troubleshoot that behavior.

For now I got these services masked:

alsa-utils.service masked enabled apache-htcacheclean.service masked enabled apache2.service masked enabled brltty.service masked enabled cryptdisks-early.service masked enabled cryptdisks.service masked enabled hwclock.service masked enabled mysql.service masked enabled pulseaudio-enable-autospawn.service masked enabled rc.service masked enabled rcS.service masked enabled saned.service masked enabled sudo.service masked enabled x11-common.service masked enabled phpsessionclean.timer masked enabled 

sudo works fine btw.

1 Answer 1

2

In many cases, these services are masked because they correspond to initscripts which are not supposed to be used with systemd, because their systemd equivalent has a different name or is handled differently.

For example, alsa-utils is masked because with systemd, /etc/init.d/alsa-utils shouldn’t be used; instead, the alsa-restore service restores the sound card settings with systemd. Likewise, saned is masked because with systemd, the SANE daemon is handled by saned.socket and [email protected].

To determine whether a masked service is a “system property”, i.e. made that way by the distribution, or a local change, check whether they are masked in /lib/systemd/system:

$ ls -l /lib/systemd/system/alsa-utils.service /lib/systemd/system/saned.service lrwxrwxrwx 1 root root 9 Dec 7 2020 /lib/systemd/system/alsa-utils.service -> /dev/null lrwxrwxrwx 1 root root 9 Jul 25 2021 /lib/systemd/system/saned.service -> /dev/null 

Masked units are linked to /dev/null; the above shows that the distribution’s maintainers set the units up in this way. If such links don’t show up in /lib/systemd/system, they’ll be in /etc/systemctl/system, and that indicates that the local system administrator masked them.

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.