D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Doh!

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob Beard wrote:
> Hi folks,
> 
> I thought you guys might find this amusing.  It is a warning that even 
> running commands with sudo can be dangerous!
> 
> I was trying to delete some files from my USB pen drive this morning.  
> For some funny reason I couldn't delete a couple of files out of the 
> Trash can (I'm running Ubuntu Edgy 6.10 Beta).  I figured, okay I 
> haven't got time to mess around so I opened up a terminal, changed to 
> the USB key directory and ran...
> 
> rm -fr .Trash-Rob
> 
> Great I thought, that's the trash emptied (it was complaining about a 
> permissions problem which I considered strange on a FAT formatted 
> device!).
> 
> I then wanted to do something else in the terminal window, I think it 
> was checking the MD5SUMs of Ubuntu Edgy that I had downloaded.
> 
> I entered cd / and pressed enter.  Unfortunately I think, I'd hit the 
> up arrow key a second before so I actually entered the command...
> 
> rm -fr .Trash-Rob cd /
> 
> Good old Ubuntu remembered my password on the sudo command as I'd 
> previously entered it a few seconds before.  Before I knew it I was 
> rm'ing everything from / downwards!
> 
> Luckily I caught it in time (Ctrl-C didn't respond) so I closed the 
> terminal window.  I think it only deleted /bin /sbin /boot and /etc as 
> my data appears to be intact.  Not ideal as I'll have to reinstall but 
> still its not the end of the world I guess.  Just as well I downloaded 
> the Edgy ISO's now :-)
> 
> So I guess the moral of the story is even when running sudo, think 
> before pressing Enter (or at least when using the rm command don't do 
> rm -fr!).
> 
> Rob
> 

easily done with "sudo" which is why I never use it...

- --
Neil Stone

Systems Administrator
FlashTek UK

- -----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GIT d+(++) s: a-(?) C++++(--) UL++++$ P+ L+++ E- W+++ N+
o+ w--- O M PS+ Y+ PGP++ t+ 5+ X+ R+ tv+ b- DI++ D+++ G
e h--- r+++ y++++(**)
- -----END GEEK CODE BLOCK-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFQi41z3Av8JKgzxQRAjxNAJ0aDMvHg7jA1dlks8ZvBCUtA7inaQCgj2zc
zmPEwyyrgR/Mhhe+c9aHuL8=
=YvBm
-----END PGP SIGNATURE-----

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html