Soo..... Just found the 2nd most scary linux command...
I was working with a colleague today with validating a linux failover cluster and needed a way of testing a lockup/system failure.
We thought -- why not generate a kernel panic? You can force a blue screen in Windows, there's gotta be a way in linux. So, with a quick lookup we found this:
echo c > /proc/sysrq-trigger as found here: http://unix.stackexchange.com/questions/66197/how-to-cause-kernel-panic-with-a-single-command
Well, it works. And that really begs the question, how the hell could you stop that? Because seriously... that's scary. a simple echo redirected at a system file and it instantly locks up a linux machine -- it doesn't even log the command to history so it's not even auditable.
If you have sudo enabled without a root password, any privileged user could stop a box. And, god forbid some kiddy puts a script to run this in /etc/init.d to run it on boot or in cron.
And there you have it, behind rm -rf /, the second most scary linux command.
...Wow
Posted Jul 12, 2016, 2:41 PM UTC
"Unix gives you just enough rope to hang yourself -- and then a couple of more feet, just to be sure."
-- Eric Allman
For those who have not read this book, enjoy
I'm laughing at the foreword:
Then, just five years later, and there's UNIX on Macs and we get the seed for variants of UNIX running on smartphones and even watches.
That book is pretty awesome. The Anti-Foreword was also really good, and written by Dennis Ritchie himself.