Running a command with sudo consistently results in two warning messages:
Jul 03 14:08:58 host-one systemd-logind[643]: Existing logind session ID 4 used by new audit session, ignoring.
Jul 03 14:08:58 host-one sudo[86144]: pam_systemd(sudo:session): Failed to check if /run/user/0/bus exists, ignoring: Permission denied
In this case, the sudo command was sudo /usr/bin/bash -c 'echo $PATH'
Note that every occurrence of my user name was changed to userx. Since these are warning messages, I’m not in a panic but the full log from running this command reveals something that I believe is an issue:
Jul 03 14:08:58 host-one sudo[86144]: userx : TTY=pts/0 ; PWD=/home/userx ; USER=root ; COMMAND=/usr/bin/bash -c 'echo $PATH'
Jul 03 14:08:58 host-one systemd-logind[643]: Existing logind session ID 4 used by new audit session, ignoring.
Jul 03 14:08:58 host-one systemd-logind[643]: New session 'c12' of user 'root' with class 'user-early' and type 'tty'.
Jul 03 14:08:58 host-one systemd[1]: Created slice User Slice of UID 0.
Jul 03 14:08:58 host-one systemd[1]: Starting User Runtime Directory /run/user/0...
Jul 03 14:08:58 host-one systemd[1]: Finished User Runtime Directory /run/user/0.
Jul 03 14:08:58 host-one systemd[1]: Starting User Manager for UID 0...
Jul 03 14:08:58 host-one (systemd)[86151]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[root] ruser=[<unknown>] rhost=[<unknown>]
Jul 03 14:08:58 host-one systemd-logind[643]: New session '15' of user 'root' with class 'manager-early' and type 'unspecified'.
Jul 03 14:08:58 host-one (systemd)[86151]: pam_unix(systemd-user:session): session opened for user root(uid=0) by root(uid=0)
Jul 03 14:08:58 host-one systemd-xdg-autostart-generator[86158]: Exec binary 'desktop-items' does not exist: No such file or directory
Jul 03 14:08:58 host-one systemd-xdg-autostart-generator[86158]: /root/.config/autostart/live-session.desktop: not generating unit, executable specified in Exec= does not exist.
Jul 03 14:08:58 host-one systemd-xdg-autostart-generator[86158]: Exec binary 'disable-dpms' does not exist: No such file or directory
Jul 03 14:08:58 host-one systemd-xdg-autostart-generator[86158]: /root/.config/autostart/disable-dpms.desktop: not generating unit, executable specified in Exec= does not exist.
Jul 03 14:08:58 host-one systemd[86151]: Queued start job for default target Main User Target.
Jul 03 14:08:58 host-one systemd[86151]: Created slice User Application Slice.
Jul 03 14:08:58 host-one systemd[86151]: Reached target Paths.
Jul 03 14:08:58 host-one systemd[86151]: Reached target Timers.
Jul 03 14:08:58 host-one systemd[86151]: Starting D-Bus User Message Bus Socket...
Jul 03 14:08:58 host-one systemd[86151]: Listening on GnuPG network certificate management daemon.
Jul 03 14:08:58 host-one systemd[86151]: Listening on GNOME Keyring daemon.
Jul 03 14:08:58 host-one systemd[86151]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Jul 03 14:08:58 host-one systemd[86151]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Jul 03 14:08:58 host-one systemd[86151]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Jul 03 14:08:58 host-one systemd[86151]: Listening on GnuPG cryptographic agent and passphrase cache.
Jul 03 14:08:58 host-one systemd[86151]: Listening on GnuPG public key management service.
Jul 03 14:08:58 host-one systemd[86151]: Listening on p11-kit server.
Jul 03 14:08:58 host-one systemd[86151]: PipeWire PulseAudio skipped, unmet condition check ConditionUser=!root
Jul 03 14:08:58 host-one systemd[86151]: PipeWire Multimedia System Sockets skipped, unmet condition check ConditionUser=!root
Jul 03 14:08:58 host-one systemd[86151]: Listening on Query the User Interactively for a Password.
Jul 03 14:08:58 host-one systemd[86151]: Listening on Disk Image Download Service Socket.
Jul 03 14:08:58 host-one systemd[86151]: Listening on Journal Log Access Socket.
Jul 03 14:08:58 host-one systemd[86151]: Listening on Virtual Machine and Container Registration Service Socket.
Jul 03 14:08:58 host-one systemd[86151]: Listening on D-Bus User Message Bus Socket.
Jul 03 14:08:58 host-one systemd[86151]: Reached target Sockets.
Jul 03 14:08:58 host-one systemd[86151]: Reached target Basic System.
Jul 03 14:08:58 host-one systemd[86151]: Reached target Main User Target.
Jul 03 14:08:58 host-one systemd[1]: Started User Manager for UID 0.
Jul 03 14:08:58 host-one systemd[86151]: Startup finished in 162ms.
Jul 03 14:08:58 host-one systemd[1]: Started Session c12 of User root.
Jul 03 14:08:58 host-one sudo[86144]: pam_systemd(sudo:session): Failed to check if /run/user/0/bus exists, ignoring: Permission denied
Jul 03 14:08:58 host-one sudo[86144]: pam_unix(sudo:session): session opened for user root(uid=0) by userx(uid=1000)
Jul 03 14:08:58 host-one sudo[86144]: pam_unix(sudo:session): session closed for user root
Jul 03 14:08:58 host-one systemd-logind[643]: Session c12 logged out. Waiting for processes to exit.
Jul 03 14:08:58 host-one systemd[1]: session-c12.scope: Deactivated successfully.
Jul 03 14:08:58 host-one systemd-logind[643]: Removed session c12.
Jul 03 14:09:08 host-one systemd[1]: Stopping User Manager for UID 0...
Jul 03 14:09:08 host-one systemd[86151]: Activating special unit Exit the Session...
Jul 03 14:09:08 host-one systemd[86151]: Stopped target Main User Target.
Jul 03 14:09:08 host-one systemd[86151]: Stopped target Basic System.
Jul 03 14:09:08 host-one systemd[86151]: Stopped target Paths.
Jul 03 14:09:08 host-one systemd[86151]: Stopped target Sockets.
Jul 03 14:09:08 host-one systemd[86151]: Stopped target Timers.
Jul 03 14:09:08 host-one systemd[86151]: Closed D-Bus User Message Bus Socket.
Jul 03 14:09:08 host-one systemd[86151]: Closed GnuPG network certificate management daemon.
Jul 03 14:09:08 host-one systemd[86151]: Closed GNOME Keyring daemon.
Jul 03 14:09:08 host-one systemd[86151]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
Jul 03 14:09:08 host-one systemd[86151]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Jul 03 14:09:08 host-one systemd[86151]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Jul 03 14:09:08 host-one systemd[86151]: Closed GnuPG cryptographic agent and passphrase cache.
Jul 03 14:09:08 host-one systemd[86151]: Closed GnuPG public key management service.
Jul 03 14:09:08 host-one systemd[86151]: Closed p11-kit server.
Jul 03 14:09:08 host-one systemd[86151]: Closed Query the User Interactively for a Password.
Jul 03 14:09:08 host-one systemd[86151]: Closed Disk Image Download Service Socket.
Jul 03 14:09:08 host-one systemd[86151]: Closed Journal Log Access Socket.
Jul 03 14:09:08 host-one systemd[86151]: Closed Virtual Machine and Container Registration Service Socket.
Jul 03 14:09:08 host-one systemd[86151]: Removed slice User Application Slice.
Jul 03 14:09:08 host-one systemd[86151]: Reached target Shutdown.
Jul 03 14:09:08 host-one systemd[86151]: Finished Exit the Session.
Jul 03 14:09:08 host-one systemd[86151]: Reached target Exit the Session.
Jul 03 14:09:08 host-one systemd-logind[643]: Removed session 15.
Jul 03 14:09:08 host-one systemd[1]: user@0.service: Deactivated successfully.
Jul 03 14:09:08 host-one systemd[1]: Stopped User Manager for UID 0.
Jul 03 14:09:08 host-one systemd[1]: Stopping User Runtime Directory /run/user/0...
Jul 03 14:09:08 host-one systemd[1]: run-user-0.mount: Deactivated successfully.
Jul 03 14:09:08 host-one systemd[1]: user-runtime-dir@0.service: Deactivated successfully.
Jul 03 14:09:08 host-one systemd[1]: Stopped User Runtime Directory /run/user/0.
Jul 03 14:09:08 host-one systemd[1]: Removed slice User Slice of UID 0.
On another host that is running the same version of Manjaro, no warning messages are logged and the full log when running sudo /usr/bin/bash -c 'echo $PATH' follows:
Jul 03 18:02:28 host-two sudo[65002]: userx : TTY=pts/0 ; PWD=/home/userx ; USER=root ; COMMAND=/usr/bin/bash -c 'echo $PATH'
Jul 03 18:02:28 host-two sudo[65002]: pam_unix(sudo:session): session opened for user root(uid=0) by userx(uid=1000)
Jul 03 18:02:28 host-two sudo[65002]: pam_unix(sudo:session): session closed for user root
Both hosts are updated when updates are published.
DISTRIB_ID="ManjaroLinux"
DISTRIB_RELEASE="26.1.0-pre"
DISTRIB_CODENAME="Bian-May"
DISTRIB_DESCRIPTION="Manjaro Linux"
I would greatly appreciate thoughts on how to troubleshoot and possibly narrow in on what is causing the issue.