The systemd-tmpfiles Service Failed

SYMPTOMS

~]# systemctl list-units
● systemd-tmpfiles-setup-dev.service loaded failed failed Create Static Device Nodes in /dev
● systemd-tmpfiles-setup.service loaded failed failed Create Volatile Files and Directories

~]# systemctl status systemd-tmpfiles-setup.service
● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
Loaded: loaded (/usr/lib/systemd/system/systemd-tmpfiles-setup.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2023-10-28 00:15:24 CST; 1min 29s ago
Docs: man:tmpfiles.d(5)
man:systemd-tmpfiles(8)
Process: 764 ExecStart=/usr/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=1/FAILURE)
Main PID: 764 (code=exited, status=1/FAILURE)

Oct 28 00:15:24 localhost.localdomain systemd[1]: Starting Create Volatile Files and Directories...
Oct 28 00:15:24 localhost.localdomain systemd-tmpfiles[764]: [/usr/lib/tmpfiles.d/cups.conf:3] Unknown group 'lp'.
Oct 28 00:15:24 localhost.localdomain systemd-tmpfiles[764]: [/usr/lib/tmpfiles.d/cups.conf:4] Unknown user 'lp'.
Oct 28 00:15:24 localhost.localdomain systemd[1]: systemd-tmpfiles-setup.service: main process exited, code=exited, status=1/FAILURE
Oct 28 00:15:24 localhost.localdomain systemd[1]: Failed to start Create Volatile Files and Directories.
Oct 28 00:15:24 localhost.localdomain systemd[1]: Unit systemd-tmpfiles-setup.service entered failed state.
Oct 28 00:15:24 localhost.localdomain systemd[1]: systemd-tmpfiles-setup.service failed.

CAUSE

The user lp no exists.

~]# id lp
id: lp: no such user

SOLUTION

Create the user lp and then restart systemd-tmpfiles.service

~]# groupadd -g 7 lp
~]# useradd -u 4 -g 7 -s /sbin/nologin -d /var/spool/lpd -c lp lp
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.

~]# systemctl start systemd-tmpfiles-setup-dev.service
~]# systemctl start systemd-tmpfiles-setup.service