This question already has an answer here:
I login at the graphical console terminal on basically stock RHEL Linux 6, and type reboot in the command window. The system reboots without being asked for a password eventhough I am not the root user. I know that this operation is not accomplished via a SUID bit on the file. BTW, reboot even works on a text based console in the same way.
If I run reboot outside the console, it complains that it is not run as root.
I am curious specifically as to how this is accomplished? The more detail the better.
I'd like to use this same mechanism for other commands. So once I understand this process I may be able to use it. BTW, please DO NOT suggest SUID or SUDO for this.