Prevent a non-root user from shutting down, rebooting or suspend the system
Hello all,
I am running redhat 5 and my question is how do I Prevent a non-root user from shutting down or rebooting the system. most of our users either ssh or vnc to our server. either way they are able to reboot and shutdown the server . how do i prevent that? Thanks |
All you have to do is remove all permissions from any user or group other than root. To do this type the following logged in as root:
Code:
chmod 750 /sbin/shutdown Code:
ll /sbin/shutdown Code:
-rwxr-x--- 1 root root 43492 2007-09-16 22:14 /sbin/shutdown |
Thank you for the reply.
i have 1 more question. after chmod to 750 /sbin/shutdown users are not able to shutdown or reboot, however, they are still able to "suspend" the linux box throught gnome menu.."system then suspend" ..is there a way to disable "suspend" too? what is the command line to suspend the box? for example to shutdown its /sbin/shutdown -h now for suspend is what? Thanks again your suggestion worked perfectly |
Quote:
Try the following: Code:
chmod 750 /usr/bin/apmsleep |
Thank you so much - apropos is really a great command to use.
Thanks |
No problem.
|
Quote:
|
Quote:
|
All times are GMT -5. The time now is 12:44 AM. |