I accidentally typed “reboot” on bash on my non-root account. It rebooted without hesitation.
(System: latest manjaro, kde, x86-64 system.)
I am not sure since when this started. To be fair, I’ve never even thought about trying this before. However, I think this is an issue; Why can anyone reboot without sudo
?
So far, what I’ve found out is as follows:
- Most commands that require sudo wouldn’t run without sudo. It may be that reboot is the only command that behaves like this.
- Some suggested that the one of the groups may be giving the privilege, but I am not sure how to identify them. Following is the groups my account is in.
$ groups
sys network power lp wheel anaconda $USER(replaced to mask my account name) - The reboot command traces back to /usr/bin/reboot, which itself is an link to systemctl.
$ ls -al /usr/bin/reboot
lrwxrwxrwx 1 root root 9 1월 10일 02:14 /usr/bin/reboot → systemctl - privilege for systemctl doesn’t seem that problematic.
$ ls -al /usr/bin/systemctl
-rwxr-xr-x 1 root root 309816 1월 10일 02:14 /usr/bin/systemctl
So, is this behavior normal or is this something I messed up? How do I fix the reboot so that it wouldn’t run without root?