On 2019.06.19 15:00, Ian Zimmerman wrote:
I'd like to have a quick way to halt my system from the keyboard,
without relying on obscure key combinations such as Alt-Up. Logging
in
as a special user (with a special password) would be ideal. And I saw
that a "halt" user already exists, with /sbin/halt as a login shell,
so
someone must have thought of this. But as it is, it doesn't work:
even
if I give the "halt" user a password (by running "passwd halt" as
root),
I get "Login incorrect" when I in fact try to login as that user.
Moreover, I don't see how it _could_ possibly work: the uid of "halt"
is
7, and /sbin/halt is not suid, so how could the process inherited from
login, with uid 7, send a signal to pid 1 - which is IIRC how halting
functions? I must be missing something important.
(No systemd here, if it wasn't already obvious.)
Won't "sudo halt" work? I frequently do "sudo reboor" or just "reboot"
from a root shell. (I am also systemd free.)
Jack