Tech Magazine

How to Break Linux?

Posted on the 25 December 2012 by Hadi20 @hadi_frht
Broken linux

20 ways to break Linux

Linux is a robust OS but there are still lots of ways you can trash it.

Linux has a reputation for robustness but there are still plenty of ways to damage a perfectly working system.
Here we share some of the ways you can trash Linux so you don't make the same mistakes we did.
Read the Complete article on techradar.com
I just came across this article, and I did some "Googling" and I found it to be discussed on many blogs and forums so I just wanted to write some notes about it.
First I'm gonna start by enumerating the 20 ways and you can always go back to the original article to find out more:
01. Fill a filesystem 02. Reinstall Windows 03. Run out of memory 04. Follow instructions on the web 05. Install more Linux 06. Update infrequently 07. Update blindly 08. Run bleeding edge software 09. Wipe /home 10. Lose a password 11. Install a new kernel 12. Try to use pulseaudio 13. Install packages from another distros 14. Run a fork bomb 15. Reinstall it 16. Disable swap 17. Install from source 18. Lose it 19. Treat it like Windows 20. Spill coffee on it
So I have three fast notes based on this post and on the comments and discussions I've seen:
  1. About the point #10: almost all distros come with recovery/fallback mode which allows password-less root privileges which means you can change the password even if you lost it.
    Solution:
    To prevent this, you can set a password to prevent any malicious activities (editing in the manner mentioned above). To do this you'll need to use grub-md5-crypt whose residence varies from distro to distro, on RHEL it's under /boot/grub.
    At the shell prompt, you'll type:  " ./grub-md5-crypt "

    this will prompt you to choose a password. This password will be hashed and the output will be there for you to grab, do so and head to /etc/grub.conf (cd /etc/grub.conf). Now all you have to do is place this line under the line where "timeout=#number" is mentioned: password --md5 YourHashedPasswordInsteadofThisLine  All you have to do now is reboot your system and check at the bottom of the GRUB menu where a "Press c to enter password" line should appear, meaning that editing the GRUB line is now password-protected by default.   
  2.  About the point #14: Now this is quite silly actually, but you wont believe how many users out there confuse between the fork bomb and the infinite loop.
    A fork bomb is a tiny shell script that rapidly creates as many processes as it can until the computer grinds to a halt and the only solution is to power off.
    An infinite loop
    is a sequence of instructions in a computer program which loops endlessly. The solution to this kind of problems is simply to send a SIGHUP (Ctrl-Z) or SIGTERM (Ctrl-C).
     
  3. Last one is about the harmless "rm -rf /" : Surprisingly there is a whole load of comments suggesting a 21th way to break Linux which is issuing the command rm -rf /. But the truth is that this command now is very harmless as every Linux distro out there prevent all users from issuing this command.  Anyway in case you don't get it here's a complete article that explain it in details with snapshots from different distros : What will 'rm -rf /' do to your linux/bsd machine?
This was all, I hope it was useful and if you have any questions or suggestions please don't hesitate to comment. And if you found any new way to mess up your Linux please let us know how.  

Back to Featured Articles on Logo Paperblog