[clue-tech] Disabling shutdown.

Michael J. Hammel mjhammel at graphics-muse.org
Thu Aug 7 08:47:44 MDT 2008


On Wed, 2008-08-06 at 21:59 -0600, David L. Anselmi wrote:
> When I asked here before the idea of renaming or chmod -x on the 
> shutdown command was suggested and that works pretty well, at least 
> against the KDE "turn off" button.  Anyone know if there are commands 
> that halt the system that bypass shutdown?

init can do it (init 0 or init 6 for reboot).  Don't remember if you
need root access to run it.  I always run it with sudo out of habit.

> But maybe these fancy modern desktops already provide a way to send 
> system messages to users, and disable shutdowns, that would be less work 
> to maintain?  Perhaps in KDE it would be with dcop.

Fedora, and I suspect most other distros these days, have gone out of
their way to make sure others can't display messages on your desktop
(remember when it was just xhost+ to allow that?  *sigh*).  These days
you have a series of things you have to do to enable it again.  I had to
disable SELinux though I'm sure you can write one of those extremely
cryptic rules for allowing it through.  There are other things you have
to do as well related to gdm.

If you have access to everyone's machine and are going to replace
shutdown anyway, you might as well add a tool to everyone's startup
sessions that simply listens for broadcast messages and displays them
(displaying no windows at startup until a message arrives).  More
secure: listen for incoming messages from a particular IP or MAC addess.
Having the tool start with the desktop will give it write permission to
the desktop.

As for shutdown, replace it with a tool that schedules the shutdown and
have your backup code check for that after it completes.  If the
schedule is there, remove it and then shutdown the system.

I'm not aware of any such setup out of the box for any distros, but then
the breadth of packages available is way beyond me.  I keep finding new
stuff everyday.
-- 
Michael J. Hammel                                    Principal Software Engineer
mjhammel at graphics-muse.org                           http://graphics-muse.org
------------------------------------------------------------------------------
Got a full 6-pack, but lacks the plastic thing to hold it all together.
-- From a real employee performance evaluation.



More information about the clue-tech mailing list