Home > Linux > Let Sudo Insult You When You Screw Up

Let Sudo Insult You When You Screw Up

I recently found a fun feature available within the sudo program that will insult you when you do the wrong thing such as enter your password incorrectly. I’ll tell you how you can activate the feature for a few laughs and also give a few examples of what insults you might get.

To turn the feature on you’ll need to use the following command:

sudo visudo

(always use visudo when you need to edit your sudoers file as it has a self-check system that won’t let you screw it up.)

Find the line that begins with Default and append insults to the end. (Any addition to that line is comma separated.) Your entry will then look like this:

Defaults !lecture,tty_tickets,!fqdn,insults

Save the file and you’ll notice the next time you screw up your sudo password you’ll get an insult.

Note: to clear your sudo session and be required to enter the password again try:

sudo -K

A few examples below:

Maybe if you used more than just two fingers…

I have been called worse.

Listen, burrito brains, I don’t have time to listen to this trash.

Good luck!

If this article has been helpful, please consider linking to it.

Categories: Linux Tags:

Related Posts

  1. February 18th, 2007 at 14:35 | #1

    this was fun, thanks for that…oh for the little things that please us ;-)

  2. Elez J. Shenhar
    February 18th, 2007 at 14:46 | #2

    FINALLY! Something for us masochists. :)

    JK

  3. KDEforMe
    February 19th, 2007 at 12:22 | #3

    I just discovered your site using Stumbleupon.com and must say it is excellent. As you can see, I use KDE and that is because it offers me many choices as to how to set it up. I like to be able to run multiple desktops with the wall paper changing every minute or so because I use my collection of digital photos I have taken. I group them and each desktop has a theme such as family, landscapes, and photos form the Net.

    Personally, KDE, affords me more control over what I want my desktop to look like and I find it much more intuitive than Gnome. Most of my friends are KDE users also and we have been using Linux for many years now.

    We have tried Gnome but just don’t like how it looks and works. But, we will admit that somethings in Gnome are nice however, KDE affords us the choices and control we desire.

  4. February 20th, 2007 at 16:12 | #4

    The insults are included at compile-time. If you want to include your own insults you need to get the sourcecode from http://www.gratisoft.us/sudo/ and edit the ins*.h files. The existing ones are quite funny already, though:

    Just what do you think you’re doing Dave?
    It can only be attributed to human error.
    That’s something I cannot allow to happen.
    My mind is going. I can feel it.
    Sorry about this, I know it’s a bit silly.
    Take a stress pill and think things over.
    This mission is too important for me to allow you to jeopardize it.
    We’ll all be murdered in our beds!
    You can’t come in. Our tiger has got flu
    What, what, what, what, what, what, what, what, what, what?
    You can’t get the wood, you know.
    … and it used to be so popular…
    Pauses for audience applause, not a sausage
    Hold it up to the light — not a brain in sight!
    There’s a lot of it about, you know.
    You do that again and see what happens…
    Harm can come to a young lad like that!
    And with that remarks folks, the case of the Crown vs yourself was proven.
    Speak English you fool — there are no subtitles in this scene.
    It’s only your word against mine.
    I think … err … I think … I think I’ll go home
    My pet ferret can type better than you!
    Your mind just hasn’t been the same since the electro-shock, has it?
    Maybe if you used more than just two fingers…
    BOB says: You seem to have forgotten your passwd, enter another!
    I can’t hear you — I’m using the scrambler.
    The more you drive — the dumber you get.
    Listen, burrito brains, I don’t have time to listen to this trash.
    I’ve seen penguins that can type better than that.
    Have you considered trying to match wits with a rutabaga?
    You speak an infinite deal of nothing

  5. February 20th, 2007 at 17:59 | #5

    Very fun! I’ll blog that!

  6. Ferdinando
    August 29th, 2007 at 02:53 | #6

    When I enabled this, it seemed funny, until I took one insult at the wrong time, and I pushed my desk too hard…
    Let’s say that the damage caused is enough to worry about, including a full reinstall on a new machine.

  7. tor
    September 2nd, 2007 at 16:36 | #7

    Amusing (in a geeky way) :-)

  8. clvrmnky
    June 18th, 2008 at 14:24 | #8

    Most of the time these insults are just kept in a header file which are sucked in at compile time. The sudo source (usually) come with more than one of these headers that you can use to tweak what you get. Or you can add your own.

    For example, I get single-line koans when I mess up the login.

  9. John thomas
    June 21st, 2008 at 06:11 | #9

    No thanks, I get enough insults from my Spouse, thank you very much.

    JT
    http://www.FIreMe.to/udi

  10. June 22nd, 2008 at 09:46 | #10

    Hmm, not working for me. Is there any change in Fedora systems?

  11. Alexander
    October 20th, 2008 at 00:15 | #11

    Ha!

  12. raw
    December 24th, 2008 at 06:41 | #12

    far too hard for me to edit anything with sudo visudo =( oh well

  13. hippie
    April 17th, 2009 at 07:09 | #13

    WTF does you using KDE have to do with anything this page is about?

  14. Eutrot
    September 23rd, 2009 at 20:27 | #14

    Thank you for this fun tut. But you should warn the user about possible mistakes.
    I have been stupid enough to:
    1) run visudo without reading the man page,
    2) type 'fdqn' instead of 'fqdn'
    3) answer 'Q' after the 'What now?' prompt. (NEVER DO THAT!)
    So I had to boot with a live CD to edit /etc/sudoers again.
    Having heard about Murphy's law, I assume that some people can be, sometimes, just as 'mentally challenged' as me…

    Summary:
    "Read carefully visudo's output. If it says 'What now?', don't type 'Q' unless you want Bad Things to happen.' should be enough advise.

  15. March 26th, 2010 at 11:54 | #15

    Instead of changing any lines themselves, simply add a line reading “Defaults insults” after the last line that starts with “Defaults”. One may put it in the end as the man sudoers page argues.

    — Multi-user scenario 1 —
    One can also direct the insults towards one or more users, where is a comma sperated user list – whitespace in is pure preference: “Defaults: insults” e.g.
    Defaults:ville insults
    — Multi-user scenario 2 —
    One could also let everyone but The Boss be insulted. The file will only be parsed once and order matters. The exclamation mark that reads “not”:
    Defaults insults
    Defaults:cnorris !insults

  16. April 23rd, 2010 at 12:07 | #16

    Excellent. The Linux rabbit hole just keeps going deeper.

    Best,
    Tom
    http://wordpress.com/thomasaaron

  1. February 18th, 2007 at 16:35 | #1
  2. February 19th, 2007 at 07:05 | #2
  3. February 19th, 2007 at 09:09 | #3
  4. February 20th, 2007 at 14:28 | #4
  5. February 21st, 2007 at 12:35 | #5
  6. April 13th, 2007 at 23:16 | #6
  7. May 5th, 2007 at 02:21 | #7
  8. August 3rd, 2007 at 06:15 | #8