Re: [systemd-devel] "Failed to connect to bus: No such file or directory" when running systemd --user commands with runuser as root

2022-09-20 Thread Andrei Borzenkov
On 20.09.2022 20:29, Dave Houser wrote: > Figured out why it was failing. I updated my post here --> > https://askubuntu.com/questions/1430191/ubuntu-20-04-not-allowing-runuser-to-manage-systemd-user-services-failed-to/1430379#1430379 > Problem was Ubuntu default user .bashrc had the following case

Re: [systemd-devel] "Failed to connect to bus: No such file or directory" when running systemd --user commands with runuser as root

2022-09-20 Thread Dave Houser
Figured out why it was failing. I updated my post here --> https://askubuntu.com/questions/1430191/ubuntu-20-04-not-allowing-runuser-to-manage-systemd-user-services-failed-to/1430379#1430379 Problem was Ubuntu default user .bashrc had the following case statement that required `bash -i` to be used

Re: [systemd-devel] "Failed to connect to bus: No such file or directory" when running systemd --user commands with runuser as root

2022-09-19 Thread Mantas Mikulėnas
Non-interactive bash invocations generally don't read ~/.bashrc and don't pay attention to environment variables that you set there. On Mon, Sep 19, 2022 at 9:36 PM Dave Houser wrote: > I am having issues on my Ubuntu 20.04 system running systemd v245. > When trying to run `runuser -l mruser -c

[systemd-devel] "Failed to connect to bus: No such file or directory" when running systemd --user commands with runuser as root

2022-09-19 Thread Dave Houser
I am having issues on my Ubuntu 20.04 system running systemd v245. 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" This does not make sense to me because I have the same set up on a RHEL 8.4