systemd-launched 服务存在于 /var/lib/systemd 中,但在 list-units、list-unit-files 或 status 中不可见

systemd-launched 服务存在于 /var/lib/systemd 中,但在 list-units、list-unit-files 或 status 中不可见

我看到以下内容/var/log/auth.log

Jun  1 06:32:49 [redacted] su: (to nobody) root on none
Jun  1 06:32:49 [redacted] su: pam_unix(su:session): session opened for user nobody(uid=65534) by (uid=0)
Jun  1 06:32:49 [redacted] systemd: pam_unix(systemd-user:session): session opened for user nobody(uid=65534) by (uid=0)
Jun  1 06:32:49 [redacted] su: pam_unix(su:session): session closed for user nobody

匹配条目/var/log/daemon.log

Jun  1 06:32:49 [redacted] systemd[1]: Created slice User Slice of UID 65534.
Jun  1 06:32:49 [redacted] systemd[1]: Starting User Runtime Directory /run/user/65534...
Jun  1 06:32:49 [redacted] systemd[1]: Finished User Runtime Directory /run/user/65534.
Jun  1 06:32:49 [redacted] systemd[1]: Starting User Manager for UID 65534...
Jun  1 06:32:49 [redacted] systemd[39580]: Queued start job for default target Main User Target.
Jun  1 06:32:49 [redacted] systemd[39580]: Created slice User Application Slice.
Jun  1 06:32:49 [redacted] systemd[39580]: Reached target Paths.
Jun  1 06:32:49 [redacted] systemd[39580]: Reached target Timers.
Jun  1 06:32:49 [redacted] systemd[39580]: Listening on GnuPG network certificate management daemon.
Jun  1 06:32:49 [redacted] systemd[39580]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Jun  1 06:32:49 [redacted] systemd[39580]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Jun  1 06:32:49 [redacted] systemd[39580]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Jun  1 06:32:49 [redacted] systemd[39580]: Listening on GnuPG cryptographic agent and passphrase cache.
Jun  1 06:32:49 [redacted] systemd[39580]: Reached target Sockets.
Jun  1 06:32:49 [redacted] systemd[39580]: Reached target Basic System.

正在看/usr/lib/systemd……

$ sudo find /usr/lib/systemd -name gpg\* -o -name gnupg\*
/usr/lib/systemd/user/gpg-agent-ssh.socket
/usr/lib/systemd/user/gpg-agent.service
/usr/lib/systemd/user/gpg-agent-browser.socket
/usr/lib/systemd/user/gpg-agent-extra.socket
/usr/lib/systemd/user/gpg-agent.socket

但是,或gpg-agent中没有列出,并且命令返回错误:list-unitslist-unit-filesstatus

$ sudo systemctl status gpg-agent
Unit gpg-agent.service could not be found.

我也尝试过--用户:

$ sudo systemctl status --user
Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined (consider using --machine=<user>@.host --user to connect to bus of other user)

显然我在这里遗漏了一些东西......

susystemd 中向用户执行nobody并启动 gpg-agent的配置文件在哪里?

答案1

systemctl status --user是您想要用来显示用户级服务的内容,因为这是“用户切片”的一部分(特别是 UID 为 65534 的那个)在您的错误消息中指出。

相关内容