Unprivileged Shutdown?

From: Dallin Dahl <dallinjdahl_at_gmail.com>
Date: Fri, 27 May 2022 21:44:32 -0600

I have been using simple privilege escalation to poweroff the machine,
but looking through the source code for s6-linux-init-shutdownd and
friends, it appears the only constraint on interacting with the daemon
is the permissions on run-image/service/s6-linux-init-shutdownd/fifo.

The default appears to be:
600 root root
I've changed it on my system to be:
620 root power
and added my user to the power group.

This seems like the cleanest way to implement unprivileged
poweroff/reboot, but I'm concerned that it's not possible by default.
Is there a better way, or is it just meant to be done manually?

Received on Sat May 28 2022 - 05:44:32 CEST

This archive was generated by hypermail 2.4.0 : Sat May 28 2022 - 05:44:57 CEST