CertGrid CertGrid
Hands-on Lab·CompTIA Linux+

A service, an account, and the permission between them

Domain 2 pairs services with accounts, and this guide treats them as one subject. It creates a system account that cannot log in, writes a unit that runs as that account, then points the unit at a directory it has no right to - and reads the failure back out of the journal before fixing the permission rather than the unit.

Services and Users Guide 5 of 28 Intermediate

Both families. The service work happens on the Debian host; the RPM host answers the same account questions differently, which is the part the exam asks about.
Server NameIP AddressOSRolesCPURAMHDD
LPLUS-A01192.168.0.73Ubuntu 26.04 LTSDebian-family host - apt, ufw, netplan, AppArmor2 Core4 GB50 GB
LPLUS-B01192.168.0.74AlmaLinux 10.2RPM-family host - dnf, firewalld, NetworkManager, SELinux2 Core4 GB50 GB

This guide includes

Use this when a service will not start and the status output only says it failed. This matters because a unit running as its own user fails on permissions far more often than on configuration, and the journal names the file while systemctl status does not.

Before you start

  1. An account that exists to run something, not to log in

  2. A directory it owns, and one it does not

  3. A unit that runs as that account

  4. What the service actually ran as

  5. The same unit, pointed at the directory it cannot write

  6. Fixing it at the layer that is broken

  7. The same account on the RPM family

  8. Putting both machines back

Official sources