1 |
On 23 March 2015 at 10:46, Peter Humphrey <peter@××××××××××××.uk> wrote: |
2 |
|
3 |
> On Sunday 22 March 2015 14:36:36 Jc García wrote: |
4 |
> > 2015-03-22 4:30 GMT-06:00 Peter Humphrey <peter@××××××××××××.uk>: |
5 |
> > > On Saturday 21 March 2015 16:20:17 Jc García wrote: |
6 |
> > >> > Interesting. But as I said ealier, I can reboot the system when I am |
7 |
> > >> > a |
8 |
> > >> > user by Ctrl+Alt+Delete. The user can reboot the system, but can't |
9 |
> > >> > shut |
10 |
> > >> > down? Strange |
11 |
> > >> |
12 |
> > >> It's not strange, `man 2 reboot`. It's a defined behavior. |
13 |
> > > |
14 |
> > > I'm with German here. Being designed that way doesn't stop it being |
15 |
> > > strange. |
16 |
> > I see it as a last resource available for rebooting under any |
17 |
> > circumstances( Similar to what you can do with Sysrq). |
18 |
> > |
19 |
> > > Consider: I'm an ordinary user sitting at a terminal. I'm not allowed |
20 |
> to |
21 |
> > > halt the machine, but I am allowed to reboot it into perhaps some quite |
22 |
> > > other configuration. Or I can keep rebooting it over and again, |
23 |
> > > effectively preventing the machine from doing its job. How does that |
24 |
> > > make sense? |
25 |
> > It doesn't and that's why it's configurable, if you are in a high |
26 |
> > security requiring environment, you disable it. |
27 |
> |
28 |
> The consensus seems to be that there's no point in trying to prevent a user |
29 |
> from rebooting the machine, and I'm happy to go along with that. |
30 |
> |
31 |
> The remaining question is: why is the user not allowed to halt it? |
32 |
> |
33 |
> -- |
34 |
> Rgds |
35 |
> Peter. |
36 |
> |
37 |
> |
38 |
> |
39 |
Maybe some people here missed my post. |
40 |
|
41 |
You CAN allow the user to halt: just substitute |
42 |
ca:12345:ctrlaltdel:/sbin/shutdown -r now |
43 |
with |
44 |
ca:12345:ctrlaltdel:/sbin/shutdown -P now |
45 |
in /etc/inittab and Ctrl-Alt-Del will shutdown instead of reboot. |
46 |
|
47 |
In fact, Ctrl-Alt-Del can be set up to do whatever you want and will |
48 |
have root privileges. |
49 |
|
50 |
If this is a security hole for your use case, you can comment it or set |
51 |
it to |
52 |
ca:12345:ctrlaltdel: /bin/echo 'Hey, don't touch me there!' |
53 |
, or you can disable it entirely in the kernel. |
54 |
-- |
55 |
Emanuele |