If I try to kill
root's process or another user's process it says you can't do this. But I can do that while shutting the system down. Isn't this a security problem?
Asked
Active
Viewed 128 times
0
-
By which means do you shut the machine down? – tink Jan 10 '19 at 17:08
-
@tink for example turning off the pc. – Mert Doe Jan 10 '19 at 17:09
-
@MertDoe: How would the operating system prevent you from physically turning off the pc? – jesse_b Jan 10 '19 at 17:10
-
@tink You are right.It was not a well thought-out answer. In fact, being able to restarting a server was confused my mind. – Mert Doe Jan 10 '19 at 17:16
-
That still raises the same question: by which means? If you're in the sudoers group then the question is moot. If you're not and you still have the ability to shutdown or reboot the machine your admin should be shot =D As Stéphane pointed out in his response: w/ physical access all things are possible. – tink Jan 10 '19 at 17:38
-
@MertDoe . Take your time and read about shutdown: - https://unix.stackexchange.com/questions/122557/how-does-the-system-shutdown-of-a-linux-kernel-work-internally - about users shutdown - https://wiki.archlinux.org/index.php/Allow_users_to_shutdown - and about polkit - https://wiki.archlinux.org/index.php/Polkit - and ACPI events - https://wiki.archlinux.org/index.php/Power_management#ACPI_events . Not a security problem, but a design. Imagine a world where you cant turn of your PC cause you are not root... – Jan 10 '19 at 17:44
-
You can never kill the process without permission, your init, which is run by root, kill them. – 炸鱼薯条德里克 Jan 11 '19 at 00:38
1 Answers
7
Those systems that let unprivileged users shut down the system usually only do it for users that are logged in locally, that is, users that have physical access to the machine and could for instance just as well pull the power chord or press the power button/switch.
In that case, it's better to let them shut down the system so it can be done gracefully and so that we have a record of who triggered the shut down.
Where the source of electrical power can be secured and access to the power button removed to regular users, it's generally possible to remove that possibility.

Stéphane Chazelas
- 544,893