This is a very general question. Let's say that some unwanted process randomly sends the shutdown signal and thus turns my server down. I don't manage to find the offending program, but I badly need to keep my server alive. Therefore my question:
How can I completely disable the ability of shutting down the system except manually and being superuser?. I want that eventually the only way to shut down my computer is by manually opening a console and typing some specific thing as superuser (eg. sudo shutdown 0). I just want my system to ignore all shutdown signals other than that.
There seems to be a problem with Kubuntu 12.04 in both my two (very different) laptops, which is very strange, taking into account that everything went fine with the 10.04 version. My both laptops, that have nothing to do with each other (a 32 bits Centrino Duo running the 32 bits version, and a 64 bits CORE i3 running the amd64 version of Kubuntu) simply FREEZE, after a random number of hours (ranging from a couple of hours to one or two days), even when I have the power management module not loaded in the default session and even when I don't run anything but the desktop. When I hit Ctrl+Alt+F1, sometimes I can see the computer has tried to shutdown (but incompletely) but other times it is completely unresponsive.
Now I desperately need one of them running 24h a day, and I want to try to DISABLE the ability of Kubuntu to shut down my computer, even if the goddamn motherboard is in flames. I don't mind. Whatever is giving the shutdown signal, I want the system to ignore that signal unless I explicitly give it by console and only as superuser, even at the cost of data loss or hardware damage, by disabling the ability of "understanding" a shutdown signal from any program.
I am not the only one with this problem: I have found this user here who says (s)he has to "reboot ubuntu 5x a week" (with the version 12.04 too)