Jump to content

Recommended Posts

Posted
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!
Posted (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 by Geoff
  • Thanks 1
Posted

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]

Posted
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

Posted

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.

Posted

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.

Posted
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 :evil_twisted:

Posted

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 :rolleyes:

 

Rob

Posted
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.

Posted
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?

Posted
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...

Posted
Lovely! I had to stick --no-preserve-root on the end for it to work though. Poor thing won't even shutdown any more :evil_twisted:

 

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.

Posted
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.

Posted
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.

Posted
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.

Posted
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. >.<

  • 1 month later...
Posted

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.

Posted

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. :cool: Walk into a crowded room with the BFG-9000 and let it rip.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...