Click to See Complete Forum and Search --> : How do I not allow users to halt or reboot?


shikara
01-25-2004, 05:03 AM
How do I not allow users to halt or reboot?

I've looked at the sudoers file and there's only one uncommented line and it pertains to root - so I don't think that's it.

I'm using Mdk 9.1.

Also, I don't want to use the Mandrake Control Panel to increase the security level.

Thanks in advance,

Shikara.

terribleRobbo
01-25-2004, 06:03 AM
Hello,

Could you post the output of:

ls -l /sbin/poweroff /sbin/halt /sbin/reboot /sbin/shutdown


(Paste that into a console and hit enter. And the character following the dash is an L, not an I. Just making sure. :D )

In case you're interested, I'm getting you to check to see if any of them are "SetUID" (AKA suid)...

shikara
01-29-2004, 07:16 AM
-rwxr-xr-x 1 root root 9780 Jan 20 2003 /sbin/halt*
lrwxrwxrwx 1 root root 4 Jun 21 2003 /sbin/poweroff -> halt*
lrwxrwxrwx 1 root root 4 Jun 21 2003 /sbin/reboot -> halt*
-rwxr-xr-x 1 root root 16344 Jan 20 2003 /sbin/shutdown*

terribleRobbo
02-01-2004, 12:18 PM
A) Thanks for the PM. :)

B) Umm... Sorry, I should've asked to clarify a tad beforehand. Do you mean shutdown from 'login screen', or from the console with poweroff, halt, reboot, shutdown, etc?

X_console
02-02-2004, 12:38 AM
By default regular users shouldn't be able to shutdown or reboot the system anyway unless you allow them to. Are they able to?

shikara
02-02-2004, 03:54 AM
Thanks guys for your replies.

I mean from the command line, not from the login screen. I was able to remove the system menu from GDM, but users can still login and type 'halt' or 'reboot' within a terminal.

Under Mdk users are automatically given some su privileges. The amount of privileges depends on the security level set in the Mdk Control Panel (changing the level also changes a million other things). I hate all of that automated stuff - I don't want to touch the security level as it will change many other things in the system that I don't want it to change.

Thanks again for your time! :)

shikara
02-06-2004, 07:32 AM
Worked it out

chmod 744 /sbin/halt /sbin/shutdown /sbin/init /sbin/telinit

and the same permissions to what ever else shuts it down: poweroff, reboot, ...

Thanks again guys for you help.

ph34r
02-06-2004, 09:34 AM
Not to mention changing the behavior of ctrl+alt+del in /etc/inittab