Four commands to spook a sysadmin
Wanna give a good Halloween scare to that special system or database administrator in your life? Try mentioning one of these commands
Is there an IT systems administrator in your life? Would you like to give him (or her) a good scare this Halloween? Well, forget horror movies, black cats or kids jacked up way too many Whoppers and consider throwing a fright into him by tossing out a command that could cause his heart to skip a beat.
Now, I’m not talking about commands written and executed by malicious people who know what they’re doing and are trying to do harm. No, I’m talking about commands that could be issued innocently enough by people in the organization who either don’t know what they’re doing, should know better or are a little too careless but which could bring a server, database or application to its knees.
Here are four classic and dangerous commands to spook your loved one with (and, please, just mention them, don't actually try running them):
rm -rf <DIR>
The grandaddy of all the dangerous commands, common to *nix systems which, if executed, will lead to the recursive removal - without prompting - of everything in and below the directory specified. Thanks to this handy dandy command it’s far too easy for an overworked developer (or one with that 2:30 feeling) to mistakenly run “rm -rf .” from the root directory when s/he intended to run it from somewhere else. Boo!
truncate table <TABLE NAME>
Torment your favorite database administrator with this command that quickly and easily wipes out every row in the specified table. Of course, part of what makes it so quick and easy is that there’s no quick or easy way to undo the damage done. If this gets executed on, say, the production database rather a developer version, that’s where your DBA friend will have to step in and clean up the mess. Hopefully, he didn’t have anything else important going on.
wget <SCRIPT URL> -O – | sh –
This command executed on most *nix systems will download a remote script and execute it all in one fell swoop. How convenient, right? Sure, so long as you know what the script does and trust from whom it came. But not so much if it’s something one of your developers found on a message board and wanted to “give a whirl.” What could possibly go wrong? Be prepared with a glass of Alka Seltzer when you spring this on your unsuspecting sysadmin victim, because heartburn is sure to follow.
mkfs <DISK PARTITION>
Ahh, the make filesystem command for (re)formatting a disk partition, again for most *nix systems. While this one may require superuser permissions to execute, it’s far too easy for even an experienced and careful user to type in the wrong partition name (wait, was it /dev/c0d1s8 or /dev/c0d0s8 that that I needed to reformat?) One incorrect letter can blow away all sorts of important stuff. This could be the subject of the next Friday the 13th movie: Jason Reformats the Disk with Our Financials.
These, of course, are just a small sample of commands the mere mention of which could make your favorite sysadmin clutch his or her chest. Any of you admins out there want to add more? Or do you have methods in place to prevent such disasters? Please share in the comments.