Open greyltc opened 4 days ago
Sorry, this might already be addressed. I couldn't find https://github.com/systemd/systemd/pull/34891 and https://github.com/systemd/systemd/issues/33033 in my search
Edit: maybe that stuff's not relevant here, I'm not sure!
we currently spawn the polkit agent only if stdin is not a pipe. I guess this is what triggers this.
we could probably change that to see if we have a controlling terminal instead, and then reopen /dev/tty and operate on that, so that this always works, even when part of a shell pipeline
systemd version the issue has been seen with
256.7
Used distribution
Arch Linux
Linux kernel version used
6.11.6-arch1-1
CPU architectures issue was seen on
x86_64
Component
systemd-run
Expected behaviour you didn't see
I expect that if I ssh into my headless server and do
echo "ls -al /root" | run0 bash
as a non-root user, then it should work just like it would if I replacedrun0
withsudo
, i.e. I should get a prompt to enter my password and then get a listing of the /root directoryUnexpected behaviour you saw
On my headless server as user in wheel group (unexpected behavior):
Expected behavior you saw
On my headless server as root user (expected behavior):
In the console on my GNOME desktop computer as a user in wheel group (expected behavior):
On my headless server as a user in wheel group using
sudo
in place ofrun0
(expected behavior):On my headless server as a user in wheel group, running the command directly instead of piping it into bash (expected behavior):
Steps to reproduce the problem
echo "ls -al /root" | run0 bash
as a non-root userAdditional program output to the terminal or log subsystem illustrating the issue
No response