su - ; \rm -rf *

From: Grzegorz Bakalarski (G.Bakalarski@icm.edu.pl)
Date: Wed Apr 20 2005 - 15:02:12 EDT


Dear All

The subjuct should tell you all :-( ...
My collegue instead of doing just "su" and then "\rm -rf * "
in an user directory, did "su - " and then "\rm -rf * ".
Well, logging works fine. Operiations on filesystems are pretty
fast :-( ... In about 10s we lost almost all system (stopped somwhere in
/opt ... ( /usr and /var surrvived)) and 200GB of production data ...
Recovery in progress ...

So I'd like to ask you about any tricks which could prevent such
mistakes/disasters? My friend suggested me to change
root's home from / to e.g. /root ... Easy...
I proposed to create a file called e.g. "-z" in /, /var , /usr , /opt
and any other important directory/mountpoint (\rm -rf * will fail
because of bad flag ) ...
Do you know about any cavities of the two above workarounds?
Please discuss any pro & conts of proposed tricks (especially
security issues)!
Any offical blueprints or links to appropriate readings on how to
secure system against such tragedy are welcome.

Kind regards

Gb

P.S. Hope this is "in-line" with topic of the list :)
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:30:34 EDT