Protect yourself from accidentally halting a server.
Posted by valqk on
In Short: use molly-guard (debian name)
While reading my 10 unix command line mistakes I've saw the wrong halting machine command.
It's nasty to halt some server instead of your local desktop.
I use molly-guard (on Debian servers - not avaliable in FreeBSD. dunno for other linuxes? any comments?) to protect myself from this kind of mistake.
It modifies the halt/shutdown script and asks you for the hostname of the server before shutdown if from ssh session.
when installed if you try to shutdown or reboot:
phew!
molly-guard saved the world for me again!
have a nice Friday evening!
cheers.
While reading my 10 unix command line mistakes I've saw the wrong halting machine command.
It's nasty to halt some server instead of your local desktop.
I use molly-guard (on Debian servers - not avaliable in FreeBSD. dunno for other linuxes? any comments?) to protect myself from this kind of mistake.
It modifies the halt/shutdown script and asks you for the hostname of the server before shutdown if from ssh session.
#>apt-get install molly-guard
when installed if you try to shutdown or reboot:
storm:/home/valqk# halt W: molly-guard: SSH session detected! Please type in hostname of the machine to reboot: ^C Good thing I asked; I won't halt storm ... W: aborting reboot due to 30-query-hostname exiting with code 1.
phew!
molly-guard saved the world for me again!

have a nice Friday evening!
cheers.
Trackbacks
Trackback specific URI for this entryThis link is not meant to be clicked. It contains the trackback URI for this entry. You can use this URI to send ping- & trackbacks from your own blog to this entry. To copy the link, right click and select "Copy Shortcut" in Internet Explorer or "Copy Link Location" in Mozilla.
No Trackbacks
Comments
Display comments as Linear | ThreadedNo comments