<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body >The glory of sudo allows you to granularly deny certain uses of commands mixed with certain arguments/options. I am sure I read a document online a few years back on the subject of safe sudo practices. I had developed a nice sudoers file for use on an email server system shortly after a colleague accidentally ran a similar command at the root level of the mailbox directory. <br><br><br>-------- Original message --------<br>From: Mike Miller <mbmiller+l@gmail.com> <br>Date: <br>To: TCLUG List <tclug-list@mn-linux.org> <br>Subject: [tclug-list] worst Linux/UNIX command line mistake, ever <br> <br><br>I have a few users on a box at work. Some are not active. I'm also about <br>to move everything to a new machine.<br><br>This is the stupid thing I did. The hard drive was full so I needed to <br>make some space. I copied files from /home/marc to another machine and <br>then was going to remove /home/marc. So I did this...<br><br>cd /home/marc<br>sudo rm -rf * <-- that would have been OK, but I killed that command<br>cd ..<br>sudo rm -rf marc <-- what I intended to do, which would have been fine<br>sudo rm -rf * <-- what I did instead<br><br>That would have wiped every file out of /home if I hadn't realized almost <br>instantly what I had done. So I hit Ctrl-C a couple of times fast and <br>looked at the damage. Nothing was lost except for all of the files for <br>the user whose name was first in alphabetical order. All 858 MB of files.<br><br>Luckily, this user was probably just using the account to transfer files <br>between other machines on a firewalled network, so it might not be a big <br>deal, but I'm not sure.<br><br>I consider myself lucky that I stopped it quickly, but that doesn't help <br>him because his files are all gone.<br><br>Yikes. I'll bet you know you should be careful with this command:<br><br>sudo rm -rf *<br><br>That's like the most dangerous command there is, except maybe for this <br>one:<br><br>sudo rm -rf /*<br><br>But we don't use that command in real life, just a joke for noobs.<br><br>Mike<br>_______________________________________________<br>TCLUG Mailing List - Minneapolis/St. Paul, Minnesota<br>tclug-list@mn-linux.org<br>http://mailman.mn-linux.org/mailman/listinfo/tclug-list<br></body>