0

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.

marked as duplicate by Gilles, jsbillings, cuonglm, Anthon, Stephen Kitt Jun 10 '16 at 7:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Can you check your aliases? reboot is probably aliased to sudo /sbin/reboot. – Peschke Jun 9 '16 at 20:29
  • @Peschke -- NOT true. /sbin/reboot is a real program. – mdpc Jun 9 '16 at 20:33
  • 1
  • 1
    @mdpc: I don't necessarily suspect it is the case, but I feel that properly verifying Peschke's point is valid. Simply check type reboot from the console to see if that is the way you have it set up or not. – Julie Pelletier Jun 9 '16 at 20:48
  • 6
    If there is not an alias for /sbin/reboot, then it is most likely polkit. See unix.stackexchange.com/questions/216818/… – Peschke Jun 9 '16 at 20:55

Browse other questions tagged or ask your own question.