Let Sudo Insult You When You Screw Up

By | 2007/02/18

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!

25 thoughts on “Let Sudo Insult You When You Screw Up

  1. matt lee

    this was fun, thanks for that…oh for the little things that please us 😉

  2. Elez J. Shenhar

    FINALLY! Something for us masochists. 🙂

    JK

  3. Pingback: links for 2007-02-18 at jensen

  4. Pingback: Kernel Source » Haz que sudo se vuelva respondón

  5. Pingback: biestado » Blog Archive » Sudo se ríe de tí cuando te equivocas escribiendo tu prasswrod

  6. KDEforMe

    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.

  7. Pingback: Deja que ’sudo’ te insulte - Bio XD

  8. steven

    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

  9. Pingback: Sudo xingando quando você erra a senha » Eu Podia Ta Matando

  10. Pingback: Hilltop Yodeler » Some Disheartening News

  11. Pingback: stefan.waidele.info » Blog Archive » Sudo beschimpft Benutzer…

  12. Pingback: [ elzoona.com.ar ] » Blog Archive » Insultado por sudo

  13. Ferdinando

    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.

  14. clvrmnky

    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.

  15. raw

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

  16. hippie

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

  17. Eutrot

    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.

  18. Ville Witt

    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

  19. Jeff

    The insults have to be included at compile time, I believe the flag is “–with-insults” and “–with-insults-all” but you can peruse the makefile.

    I add my insults to the ins_csops.h file, though for some reason the ins_2001.h file doesn’t include the classic “I’m sorry, Dave. I’m afraid I can’t do that.”

Comments are closed.