<div dir="ltr">I am having issues on my Ubuntu 20.04 system running systemd v245.<div>When trying to run `runuser -l mruser -c "systemctl --user status myservice.service"` I keep getting "Failed to connect to bus: No such file or directory" </div><div><br></div><div>This does not make sense to me because I have the same set up on a RHEL 8.4 system running systemd v239, and I dont see this issue. I can run systemd --user commands as root with runuser with no issues. </div><div><br></div><div>Here is the troubleshooting I performed. <br><br><ul style="margin-top:0px;margin-right:0px;margin-left:30px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-stretch:inherit;line-height:inherit;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px;vertical-align:baseline;list-style-position:initial;box-sizing:inherit;color:rgb(35,38,41)"><li style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit">tried running <code style="margin:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;white-space:pre-wrap">systemctl --user status myservice.service</code> as <code style="margin:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;white-space:pre-wrap">mruser,</code> command runs with no errors.</li><li style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit">I already checked loginctl for <code style="margin:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;white-space:pre-wrap">mruser</code>, <code style="margin:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;white-space:pre-wrap">Linger=yes</code></li><li style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit">Checked to make sure there was a <code style="margin:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;white-space:pre-wrap">systemd --user</code> process running with <code style="margin:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;white-space:pre-wrap">ps</code></li><li style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit">Logged into the user's account directly with separate ssh session, Then tried the same command as root in the original session, still same error.</li><li style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit"><code style="margin:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;white-space:pre-wrap">mruser</code> already has <code style="margin:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;white-space:pre-wrap">export XDG_RUNTIME_DIR=/run/user/$(id -u)</code> in <code style="margin:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;box-sizing:inherit;white-space:pre-wrap">~/.bashrc</code></li><li style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit">Tried rebooting the system, still nothing.</li><li style="margin-top:0px;margin-right:0px;margin-left:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit">Deployed a new instance of Ubuntu 20.04, same problem on it. </li><li style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit">Already read <a href="https://askubuntu.com/questions/1374347/error-running-systemd-as-user-failed-to-connect-to-bus-dbus-session-bus-addr" style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:inherit;vertical-align:baseline;box-sizing:inherit">this post</a>, was not very helpful.</li></ul><div><font color="#232629" face="-apple-system, BlinkMacSystemFont, Segoe UI Adjusted, Segoe UI, Liberation Sans, sans-serif"><span style="font-size:15px">I made a post about this you can find it here --> </span></font><a href="https://askubuntu.com/questions/1430191/ubuntu-20-04-not-allowing-runuser-to-manage-systemd-user-services-failed-to?noredirect=1#comment2491580_1430191">https://askubuntu.com/questions/1430191/ubuntu-20-04-not-allowing-runuser-to-manage-systemd-user-services-failed-to?noredirect=1#comment2491580_1430191</a></div><div><br></div><div>This seems like odd behavior so I am not sure why this is happening. Can anyone help?</div><div><br></div><div>- Dave</div></div><div><br></div><div><br></div></div>