LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   disable shutdown by press the power button (https://www.linuxquestions.org/questions/general-10/disable-shutdown-by-press-the-power-button-533089/)

nickraj 02-27-2007 06:46 PM

disable shutdown by press the power button
 
hi

I got various ways to disable shutdown ,if I press the power button on the desktop. But if I press the power button on the desktop for 5-10 sec, the computer shuts down, is there any way that I can disable this . I have checked the bios setting also but i was not able to find any related to this. can anybody help


thanks

SlowCoder 02-27-2007 07:48 PM

The 5 second method is for hard shutdowns, for cases in which the OS has become completely non-responsive. I've never heard of a way to disable this feature, but I suppose a way to get around this could be to reroute the switch wiring to a hidden location so that it would be harder to power it off.

Why would you want to disable it? It's a great feature to have.

nickraj 02-27-2007 11:09 PM

Quote:

Originally Posted by SlowCoder
The 5 second method is for hard shutdowns, for cases in which the OS has become completely non-responsive. I've never heard of a way to disable this feature, but I suppose a way to get around this could be to reroute the switch wiring to a hidden location so that it would be harder to power it off.

Why would you want to disable it? It's a great feature to have.

because that linux machine is accesed remotly and some time people shutdown the machine , disconnecting the remote user . I want that only root cando so .

JimBass 02-28-2007 12:38 AM

There is no way to do that. You are trying to disable something outside the control of the OS. That is like asking how to keep a machine from shutting off when it is unplugged!You may be able to disconnect the wiring within the case itself so that the wires running from the button to the motherboard are disconnected, but that also may prevent the machine from being powered on.

The real issue here is why people are physically shutting the machine off? Either get the machine in a server room where random people cannot access it, or put a note on it stating that it should never be powered off.

Peace,
JimBass

reddazz 02-28-2007 03:39 AM

Moved: This thread is more suitable in the General forum and has been moved accordingly to help your thread/question get the exposure it deserves.

raska 02-28-2007 09:21 AM

Quote:

Originally Posted by nickraj
....But if I press the power button on the desktop for 5-10 sec, the computer shuts down, is there any way that I can disable this....

For the 5 secs timeout, I think it's mandatory and you can't disable that. It's part of a higher conspiracy to take over the world by shutting all the machines down in 5 secs intervals.

On the other side, under linux (Slackware 11.0) I disabled the shutdown that triggers then touching that button, because I didn't want office people to mess up with my machine. You can do so by just issuing as root
Code:

chmod -x /etc/acpi/acpi_handler.sh
I also commented out the "Three finger salute" in /etc/inittab as the aforementioned people love to press [Ctrl]+[Alt]+[Del] whenever they panic by seeing a black screen CLI (a tty console).

This was under Slackware, so I can't really help you for other distros ;)
Godspeed

JimBass 02-28-2007 09:30 AM

He already has a "quick" power button being pressed fixed, that is the first line of the OP. It is just the pressing it and holding it, which as you and others of us have written, is beyond the control of the OS and can't be messed with.

Peace,
JimBass

Amenemhet 03-02-2007 10:36 PM

Nope, Jim is right, and you don't realy want to disable it , you may need it it one day(Murphy is lurking around the corner again). I would tape something over it to prevent people from turning it off, if you can't have it in a secure room.

nickraj 03-02-2007 11:16 PM

thank you all


All times are GMT -5. The time now is 10:13 PM.