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