[Tfug] How to allow the user to reboot?

Claude Rubinson rubinson at u.arizona.edu
Fri Nov 9 15:52:09 MST 2007


On Fri, Nov 09, 2007 at 02:43:57PM -0700, jblais wrote:
> Generally you need to be root to do a '/sbin/shutdown -h now', so, how does
> the gnome desktop do a shutdown when you're a regular user?
> 
> Can that command be accessed by a user's script?

While I realize that you've already solved the issue, it's important
to understand what's going on here.  Since Unix supports multiple
[remote] users, it would be foolhardy to let just anybody to shutdown
the system.  Hence, why the shutdown command is restricted to root
user.  What sudo lets you do is distribute root privileges to select
individuals.

Sudo privileges should, therefore, be distributed judiciously.  Don't
simply grant yourself privileges to everything (as is becoming more
and more common with desktop-oriented distros) as that's only slightly
safer than logging in as root.

Claude




More information about the tfug mailing list