Test Test How to insult users who mistype their sudo password | Çınar Mert Çeçen - Blog
Skip to content
Go back

How to insult users who mistype their sudo password

it was (and still is) shocking to me that this is actually a feature in sudo, but you can enable insults to be shown to users who mistype their password, like so:

cinar@fedora ~$ sudo -v
[sudo] password for cinar: 
The more you drive -- the dumber you get.
[sudo] password for cinar: 
You speak an infinite deal of nothing
[sudo] password for cinar: 
sudo: 3 incorrect password attempts
cinar@fedora ~ [1]$ 

one should NEVER open the /etc/sudoers file with a normal text editor. always use sudo visudo.

  1. open the /etc/sudoers file by running:
sudo visudo
  1. add this line to the end of the file:
Defaults insults
  1. save the file and exit.

if you want to get a password prompt again, try killing your session with sudo -k.


while you are here, you might also want to show asterisks when typing your password like so:

cinar@fedora ~$ sudo -v
[sudo] password for cinar: *************

or you might want to change the sudo timeout so you don’t have to type your password so often. in either case, click the relevant link.


Share this post on:

Previous Post
How to make lecture show up forever in sudo
Next Post
Thunderbird Mail'de harici PGP anahtarı (=yubikey/...) kullanımı