[PLUG] Allowing user shutdowns

Anthony Schlemmer aschlemm at attbi.com
Sun Sep 22 21:02:04 UTC 2002


Do you have "sudo" installed? You can grant specific users access to the 
shutdown command and you don't have to give them root access. The user 
would then run something like:

sudo shutdown -h now

You can probably setup Linux to perform a reboot with a 
"three-fingered-salute" as well. I things that can be setup in the 
/etc/inittab file. I know my SuSE system supports this because while 
attempting to go to a virtual console I presses CTL-ALT-DEL rathar than 
CTL-ALT-2...DOH!

Tony

On Sunday 22 September 2002 13:03 pm, Rich Shepard wrote:
>   I know that only root can issue the 'shutdown' command, but what is
> the accepted procedure when the installation is on a laptop and you
> don't want to give the user root priviledges? I can think of only two
> scenarios:
>
>   1) Make a different root password for that box and hope that
> accidents are few and far between; or,
>
>   2) Write a script, called perhaps 'done', that su's to root, uses
> expect to supply the root password, then issues the 'shutdown -h now'
> command.
>
>   The second is cleaner and safer, but I've never done any expect
> programming and I don't know if it can be used to supply the root
> password in a situation as I've described.
>
> Thoughts?
>
> Rich
>
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug

-- 
Anthony Schlemmer
aschlemm at attbi.com

One can't proceed from the informal to the formal by formal means.





More information about the PLUG mailing list