News for hackers. Stuff that matters.
Re:How To Make a Quick Buck by freehunter on Thursday February 21, 2013 @11:49AM (#5258453)
I was working in the web interface of one of our appliances at work just before lunch. One of my coworkers (with whom I share admin duties of this appliance) set his computer to shut down then left to pick up some food. Suddenly I noticed the appliance was unresponsive! I was getting site not found errors, and I couldn't even SSH into the machine. I look at my coworkers computer and realize it's still running, but the last command he ran was a shutdown in a remote shell...
Re:How To Make a Quick Buck by shabble on Thursday February 21, 2013 @01:25PM (#5259065)
That's where molly-guard[1] comes in; stops (or at least confirms) shutdown on protected hosts. Named after the Big Red Button Cover of hacker-lore[2].

I've heard of people doing things like having a terminal background colour escape sequence in their login scripts as well, so it's immediately obvious if you're on a production host.

[1] http://manpages.ubuntu.com/manpages/natty/man8/molly-guard.8...

[2] http://www.catb.org/jargon/html/M/molly-guard.html

Re:How To Make a Quick Buck by jlgaddis on Thursday February 21, 2013 @05:12PM (#5260848)
My $PS1 always contains the hostname of the machine I'm SSH'd into IN ALL CAPS so that I never do this (again).
Re:How To Make a Quick Buck by shabble on Thursday February 21, 2013 @06:20PM (#5261315)
Given the well-established treachery of my finger muscle-memory, I'm much more comfortable with a hard interlock than something that relies on me checking the prompt. Definitely better than nothing though.
Re:How To Make a Quick Buck by waverider on Thursday February 21, 2013 @12:00PM (#5258517)
Yes, that happens to the best of us: proper command, wrong machine :).

Now, shutdown and rm are the worst to add to the mix.

Re:How To Make a Quick Buck by freehunter on Thursday February 21, 2013 @12:24PM (#5258649)
Don't get me started on how many times I've confused the rename command with the rm command...

Hint: it was only once.