This question already has an answer here:
I'm experimenting around with Debian and I'm wondering about their permissions concerning systemd and reboot. I made the following obersvations (Debian Buster with lightdm and i3 WM):
- The commands
poweroffetc. map to
/sbin/poweroffwhich is a link to
-r-s------and is inaccessible to the user
- As a result,
systemctl poweroffetc. will not work, not even
systemctl --user mycommandwill not work (unlike e.g. on Arch Linux).
However when I install KDE, I can poweroff and reboot from the menu without entering a password! I didn't find any useful answers online and I don't understand how this is possible. How do they achieve that?