Security Basics mailing list archives

Re: Linux shutdown


From: Fabio <fabio () crearium com>
Date: Wed, 27 Oct 2004 20:31:13 -0600

Pablo Gietz wrote:

Hi peolple
Do you know how to do a Linux (clear) shutdown without root privileges from login screen? I want to give a user the privilege of shutdown the server without being root. I have heared about umount problems of the file system.

Try sudo. Limit the user just to execute shutdown and prompt it for password. check sudoers file. Add flag -y to shutdown command.

Other option is let user execute a script with sudo, then the script executes shutdown in the background (so the user can log off normaly). Should be mode 700 and not setuid but owned by root, It will be executed as root. Depends on your os type and init level, shutdown will unmount all mounted points and give control to the basic system avalible (ej: openboot on Sun)

ebar.



Current thread: