Re: shutdown/halt as user
* David Wright (ichbin@shadlen.org) spake thusly:
>
> > How can I let a normal user use the "halt" or "shutdown" command?
>
> All the responses to this query have been ugly hacks. The right way to do
> this this (put on flame-retardant suit here) is the way RedHat does: make
> the halt binary call up pam for authenticaton and authorization and allow
> the sysadmin to configure access in /etc/pam.d/halt. RedHat's code is GPL
> -- why don't we just steal it?
If you want your users to run $foo, you change permissions on it.
If you want *some* of your users to run $foo, you use sudo or create
a separate group "foorunners" and change permissions on $foo accordingly.
With shutdown, there's also inittab and two-button-triple-click in gpm,
if you want to let console user to halt the box.
Now, would you like /sbin/halt to also show a "Are you really really
sure (Abort/Ignore/Retry/Fail)?" dialog a few times and then count to
10 (so we could press ^C) before doing "telinit 0"? And, of course,
to "Require:" pam, newt, dialog, ncurses, libgtk, qt, kdelibs (for
gnome & kde front-ends, resp., that someone may or may not want to
install on their box), and xlibs?
Dima (*boggle*)
Reply to: