/sbin and I see that
shutdown has permissions
rwxr-xr-x. Doesn't this mean that anyone can execute it?
Anyone can execute
Specifically: Only a process running with root privileges (effective UID 0) can direct the init system to stop system services, terminate all user processes, and issue the system call that actually stops the machine. (If
What about calling
See the strace output of:
Yes ! Everybody can run that command. As you said, you're able to run it but you're faced with a "Need to be root" message, not a
It appears that shutdown will check an access list if you flag it with -a:
Since you're currently calling it without the -a flag, it's defaulting to allowing root shutdowns only.
If you want additional users to be able to run the command, configure that file and use the flag.
Permission bits don't necessarily exclude access control based on a user or group.
protected by Michael Mrozek♦ Dec 7 '13 at 0:02
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?