kirchie Posted November 30, 2012 Posted November 30, 2012 I'm having a play around with various different flavours of Linux in VM form, and we were wondering in the office, is there an equivalent in Linux of deleting system32 from Terminal? Just want to see what happens!
kmount Posted November 30, 2012 Posted November 30, 2012 rm -rf / (you can be assured it won't work well after you've done the above)
Geoff Posted November 30, 2012 Posted November 30, 2012 (edited) As a normal user, you can't break anything other than your own stuff in your home directory (depending on the limits set by root, for example you could still max the CPU, fill the memory or the disk as a normal user if there were no process limits or disk quotas imposed on you). You can test if this is the case by running a fork bomb. #!/bin/sh ){ :|:& };: As root you can destroy the file system and its contents and even destroy physical hardware if you so choose to (overwriting firmware or the bios that linux exposes rw to root via /dev). Remember with Linux there are no safety nets. It assumes you know what you are doing and will follow your requests to the letter. With all the terrible consequences that entails. Edited November 30, 2012 by Geoff 1
Oaktech Posted November 30, 2012 Posted November 30, 2012 don't adjust logging on your linux webserver, let the log files fill up and and the system will grind to a halt... it's not deleting the OS, but you can break it like that! [/got the tshirt]
Geoff Posted November 30, 2012 Posted November 30, 2012 don't adjust logging on your linux webserver, let the log files fill up and and the system will grind to a halt... it's not deleting the OS, but you can break it like that! [/got the tshirt] man logrotate
CyberNerd Posted November 30, 2012 Posted November 30, 2012 man logrotate and put /var onto another filesystem
CAM Posted November 30, 2012 Posted November 30, 2012 Re-installed it quite a few times already the last few weeks due to some "soft trashings" of my Linux installs... - Swapping from GNOME to KDE once broke my auto-updates with 'permission errors.' - Install compiz-config and disable OpenGL compositing whilst set to auto-login. All you will see is your desktop wallpaper. - Attempt to run Guild Wars 2 with the latest version of Wine. Watch as Compiz proceeds to hog 100% CPU and require you to use TTY1 to restart the system. - Delete every icon from the desktop and every single KDE launcher. If you don't know how to get them back... I'm sure there are thousands of commands or config tweaks that will cripple your system forcing you to restart or re-install. That said, learning to use the CTRL+ALT+Fx combo helps greatly for recovering a botched config or rogue program.
CyberNerd Posted November 30, 2012 Posted November 30, 2012 I'm sure there are thousands of commands or config tweaks that will cripple your system forcing you to restart or re-install. I'm sure there are - but I don't think any of the things you mentioned are beyond fixing.
kirchie Posted November 30, 2012 Author Posted November 30, 2012 rm -rf / (you can be assured it won't work well after you've done the above) Lovely! I had to stick --no-preserve-root on the end for it to work though. Poor thing won't even shutdown any more
twin--turbo Posted November 30, 2012 Posted November 30, 2012 Ahh, i remember switching to the wrong machine on remote terminal and instead of being in /var/spool/xyxyxy , I was in / After thinkg for a few moments that it was taking longer than expected I realised that I was in the process of wiping the filesystem of our proxy server... HayHo.. It was a bit screwed.. But it had not got as far as TAR... So just untared the backup file back to the files system Rob
CyberNerd Posted November 30, 2012 Posted November 30, 2012 Ahh, i remember switching to the wrong machine on remote terminal and instead of being in /var/spool/xyxyxy , I was in / After thinkg for a few moments that it was taking longer than expected I realised that I was in the process of wiping the filesystem of our proxy server... yep. been there and done that. Many years back I managed to rm -rf an entire UNIX web server.
kirchie Posted November 30, 2012 Author Posted November 30, 2012 yep. been there and done that. Many years back I managed to rm -rf an entire UNIX web server. So it's safe to say that Linux assumes that you know what you're doing, hence the lack of pop ups every other minute asking if you're sure you want to delete/do something?
X-13 Posted November 30, 2012 Posted November 30, 2012 So it's safe to say that Linux assumes that you know what you're doing, hence the lack of pop ups every other minute asking if you're sure you want to delete/do something? TBF, Linux is usually on backend stuff. So it's managed by people with experience of it. Linux needs a n00bmode command...
unixman_again Posted November 30, 2012 Posted November 30, 2012 Lovely! I had to stick --no-preserve-root on the end for it to work though. Poor thing won't even shutdown any more Back in the days of SCO/Unix on the 386, this command would run right up until it removed the rm executable, and then it would stop. After your timeslice is up, your session gets rolled out. When it gets rolled in again, it reloads the binary and continues from where it left off, but of course the binary isn't there anymore. One way to break a Linux system is dd if=/dev/zero of=/dev/sda bs=1024 count=a big number. Of course, you might have to change the disk assignment.
bladedanny Posted November 30, 2012 Posted November 30, 2012 I'm sure this has been posted on here before but it's relevant to the thread. How Pixar Almost Deleted Toy Story 2 | Software Testing Blog
CyberNerd Posted November 30, 2012 Posted November 30, 2012 So it's safe to say that Linux assumes that you know what you're doing, hence the lack of pop ups every other minute asking if you're sure you want to delete/do something? Absolutely. On the plus side - rebuilding a *nix server takes a fraction of the time than a windows machine -its literally copying config files and occasionally changing permissions. Just document as you go along.
X-13 Posted November 30, 2012 Posted November 30, 2012 I'm sure this has been posted on here before but it's relevant to the thread. How Pixar Almost Deleted Toy Story 2 | Software Testing Blog I forgot about "rm -i" [Mentioned in the comments section.] I think I may need to use "alias rm='rm -i'" as part of my standard user setup.
SYNACK Posted November 30, 2012 Posted November 30, 2012 I'm having a play around with various different flavours of Linux in VM form, and we were wondering in the office, is there an equivalent in Linux of deleting system32 from Terminal? Just want to see what happens! Installing it usually leaves it at least partially broken, depending on the hardware. You could also install it on Hyper-V, some (openBSD - I know not really Linux) will happily crash every hour on the hour for fun.
Geoff Posted November 30, 2012 Posted November 30, 2012 I forgot about "rm -i" [Mentioned in the comments section.] I think I may need to use "alias rm='rm -i'" as part of my standard user setup. I think CentOS/Redhat does this out the box. It also sets some reasonable defaults for /etc/security/limits.conf too.
CAM Posted November 30, 2012 Posted November 30, 2012 I forgot about "rm -i" [Mentioned in the comments section.] I think I may need to use "alias rm='rm -i'" as part of my standard user setup. Downside is Linux goes to the other extreme and asks you for confirmation for every bloody file. >.<
Geoff Posted November 30, 2012 Posted November 30, 2012 No, it did exactly what you asked it to do. Not it's fault if you didn't think things through.
unixman_again Posted November 30, 2012 Posted November 30, 2012 If you use -I with the rm command, the system only asks you once. 1
mister_z Posted January 9, 2013 Posted January 9, 2013 Well, there are many ways to hose Linux -- as root. But if you routinely run things as root, you deserve what you will eventually get. You're basically saying "Yes, I know the gun is loaded, but I want to muck about with it anyway just to see what happens." That's why sudo was invented. If you have to sudo the command, you'd best understand what you are doing. If you are operating as a standard user on a well-managed system (i.e. one with quotas, limits, etc), there's little you can do to screw up anyone save yourself. As root ? You can delete the entire file system, destroy the volume manager information, reformat hard-drives, just about anything.
Duke5A Posted January 10, 2013 Posted January 10, 2013 My favorite way to hose a Linux system is this: Doom http://www.cs.unm.edu/~dlchao/flake/doom/start.gif Original Doom on Linux modified to attach the process ID to each monster. Kill the monster, kill the process. Walk into a crowded room with the BFG-9000 and let it rip.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now