Gentoo Archives: gentoo-user

From: Ian Zimmerman <itz@××××××××××××.org>
To: Gentoo-User Mailinglist <gentoo-user@l.g.o>
Subject: [gentoo-user] What is the "halt" user for?
Date: Wed, 19 Jun 2019 19:00:44
Message-Id: 20190619190028.s7ep5aaqdk2bp3co@matica.foolinux.mooo.com
1 I'd like to have a quick way to halt my system from the keyboard,
2 without relying on obscure key combinations such as Alt-Up. Logging in
3 as a special user (with a special password) would be ideal. And I saw
4 that a "halt" user already exists, with /sbin/halt as a login shell, so
5 someone must have thought of this. But as it is, it doesn't work: even
6 if I give the "halt" user a password (by running "passwd halt" as root),
7 I get "Login incorrect" when I in fact try to login as that user.
8
9 Moreover, I don't see how it _could_ possibly work: the uid of "halt" is
10 7, and /sbin/halt is not suid, so how could the process inherited from
11 login, with uid 7, send a signal to pid 1 - which is IIRC how halting
12 functions? I must be missing something important.
13
14 (No systemd here, if it wasn't already obvious.)
15
16 --
17 Please don't Cc: me privately on mailing lists and Usenet,
18 if you also post the followup to the list or newsgroup.
19 To reply privately _only_ on Usenet and on broken lists
20 which rewrite From, fetch the TXT record for no-use.mooo.com.

Replies

Subject Author
Re: [gentoo-user] What is the "halt" user for? Jack <ostroffjh@×××××××××××××××××.net>
Re: [gentoo-user] What is the "halt" user for? Philip Webb <purslow@××××××××.net>