Near miss



  • Seeing as I'm bored I thought I'd share a couple of close calls I've had in the past. If anyone can relate feel free to post your own stuff.

    The first near miss took place back when I was learning to administer (and I use the term loosely) linux servers. I was looking around when I decided to try sending an email from the command line. The plan was to pipe it to sendmail. Unfortunately I used > instead of | which had the unfortunate effect of overwriting the sendmail executable with my text message.

    Oops. 

    Thankfully I knew of another server using the very same version of sendmail and promptly copied the executable from there. Apart from a bunch of error messages in the logs it never happened. Sometimes you have to admire linux. 

    Moral of the story: root privilleges + experimentation = high probability of getting that sinking feeling in your gut.

    The second one was a bit more recent. I had decided to delete old print jobs from samba which were lurking in /var/spool/samba/. I was just about to delete all the dir contents when I noticed some odd files several hundred Mbs each. I paused. Then scratched my head. Then realised I was in fact in /var/spool/mail/, the folder where everyone's mail inbox was kept. I was a few keystrokes away from deleting GBs of emails. Granted we have backups but you do not want to be restoring GBs from tape while a few dozen irate users can't use their email.

    Moral of the story: Don't delete stuff in the server if you haven't had your coffee yet.  



  • @DOA said:

    Thankfully I knew of another server using the very same version of sendmail and promptly copied the executable from there. Apart from a bunch of error messages in the logs it never happened. Sometimes you have to admire linux.

    How does this have anything to do with Linux?  If you deleted an executable on Windows (which would be much harder, BTW, since there is no command-line voodoo) it could be replaced the same way.

     

    From the sound of it, you shouldn't have root privileges on anything.  The sendmail mistake is somewhat minor but confusing /var/spool/mail/ with /var/spool/samba/ and almost deleting it?  That's shameful. 



  •  A.  Why the fuck would you just delete gigabytes of data that you don't know why it's there on a production server?
    B. Fix your permissions son!
    # ls -l /usr/lib/sendmail
    -r-xr-sr-x   1 root     smmsp    1020544 Aug 16  2007 /usr/lib/sendmail



  • @DOA said:

    near miss
    A near miss is a hit.  It nearly missed.  It sounds like you had a near hit.



  • @belgariontheking said:

    @DOA said:
    near miss
    A near miss is a hit.  It nearly missed.  It sounds like you had a near hit.
    I suppose. Wait... filed under herpes?



  •  @belgariontheking said:

    @DOA said:

    near miss
    A near miss is a hit.  It nearly missed.  It sounds like you had a near hit.

    Look, trying to comprehend this sort of thing is like !==.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.