You are not logged in.

#1 2013-06-10 00:50:42

TheGuyWithTheFace
Member
Registered: 2012-12-09
Posts: 108

[SOLVED] How do I make custom insults for incorrect sudo attempts?

Hi everyone! I am in the process of setting up arch on a new (to me) laptop, and when I was configuring sudo, I saw that there's an option to have sudo automatically insult the user when the password is entered incorrectly. I'd love to be able to add my own insults to the mix, (Think: "I'm sorry Dave, I'm afraid I can't do that...") but I'm not really sure how. I'm guessing there's a file somewhere filled with insults that are randomly pulled from? If so, where is it? If not, how else might I add custom insults?

Last edited by TheGuyWithTheFace (2013-06-10 01:37:14)

Offline

#2 2013-06-10 00:57:58

karol
Archivist
Registered: 2009-05-06
Posts: 25,432

Re: [SOLVED] How do I make custom insults for incorrect sudo attempts?

Offline

#3 2013-06-10 01:07:28

TheGuyWithTheFace
Member
Registered: 2012-12-09
Posts: 108

Re: [SOLVED] How do I make custom insults for incorrect sudo attempts?

Well, that's embarrassing... I guess your googling prowess surpasses mine! Regardless, How do I implement this patch of his? Perhaps something was lost in translation, but I don't see how he actually used that code he posted to modify sudo's behavior... Thanks for your patience, by the way.

Offline

#4 2013-06-10 01:12:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,432

Re: [SOLVED] How do I make custom insults for incorrect sudo attempts?

I haven't tested it, but seems that you can put your custom insults in /etc/insults and it will pick them randomly.

That thread is rather old and I can't guarantee that it will work with the current sudo.

Offline

#5 2013-06-10 01:17:46

TheGuyWithTheFace
Member
Registered: 2012-12-09
Posts: 108

Re: [SOLVED] How do I make custom insults for incorrect sudo attempts?

Wow! That was a fast response...
But how do I actually execute the code that he posted that makes sudo read from that file for insults? It doesn't look like something to be copied into the shell or anything, so what do I do with it?

Offline

#6 2013-06-10 01:24:10

karol
Archivist
Registered: 2009-05-06
Posts: 25,432

Re: [SOLVED] How do I make custom insults for incorrect sudo attempts?

Oh, you have to learn what a diff and patch is.
https://wiki.archlinux.org/index.php/Patching_in_ABS has some info, google has lots more. I'm not sure if toying with sudo is a good idea, so maybe don't install it, just make it (i.e. build it), or install it in a different place, so it doesn't overwrite the normal sudo. You can modify the PKGBUILD https://projects.archlinux.org/svntogit … kages/sudo

Offline

#7 2013-06-10 01:35:42

TheGuyWithTheFace
Member
Registered: 2012-12-09
Posts: 108

Re: [SOLVED] How do I make custom insults for incorrect sudo attempts?

Ok, thanks a bunch!

Offline

Board footer

Powered by FluxBB