使用 SSH 时,“who”命令输出空白

使用 SSH 时,“who”命令输出空白

我有一个 Ubuntu 虚拟机,我可以通过 SSH 访问它。当我执行命令时,who什么也没得到。此外,执行以下命令时,我得到了以下输出systemctl --user

Failed to connect to bus: No such file or directory

执行时,systemctl status dbus除此行外,一切正常:

[system] Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms)

日志之前的输出是:

dbus.service - D-Bus System Message Bus
Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
Active: active (running) since Tue 2023-01-03 14:12:08 UTC; 20h ago
 Docs: man:dbus-daemon(1)
Main PID: 1368 (dbus-daemon)
 Tasks: 1 (limit: 4915)
 CGroup: /system.slice/dbus.service
       └─1368 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only

的输出systemctl status systemd-logind为:

systemd-logind.service - Login Service
Loaded: loaded (/lib/systemd/system/systemd-logind.service; 
static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2023-01-04 11:25:15 UTC; 1h 44min ago
Docs: man:systemd-logind.service(8)
       man:logind.conf(5)
       https://www.freedesktop.org/wiki/Software/systemd/logind
       https://www.freedesktop.org/wiki/Software/systemd/multiseat
 Process: 24112 ExecStart=/lib/systemd/systemd-logind (code=exited, status=1/FAILURE)
 Main PID: 24112 (code=exited, status=1/FAILURE)
 Status: "Shutting down..."

对于正在发生的事情有什么建议吗?

答案1

问题已解决 - 目录/var/run应该是符号链接到的/run,但由于未知原因,事实并非如此。

请参阅: 由于 /var/run 不是符号链接,我的 /var 目录是否正常?

相关内容