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/bin/systemctl /bin/systemctlhas permissions-r-s------and is inaccessible to the user- As a result,
systemctl poweroffetc. will not work, not evensystemctl --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?
polkitlike other DEs, please check here. In short: the GUI user is explicitly given the permission to perform these tasks. – FelixJN May 27 '19 at 12:27