Have sudo insult you

This is a strange tip that reflects the Monty Python-style humor that pervades Linux. To see mild and humorous insults whenever you get your sudo/gksu password wrong, open a terminal and type sudo visudo. Then navigate to the end of the line that begins Defaults and type [a]. This will switch to INSERT mode, so type a comma, and then the word insults. See Figure 3.43 for an example of how the file looked after editing on my test PC.

Following this, don't hit [Enter], but instead hit [Esc], and type :wq to save the file and quit the text editor. The changes will take effect immediately so try preceding a command with sudo and deliberately get your password wrong to see what happens (first you will have to kill the sudo grace period: sudo -K).

Note that if you make a mistake editing the file above, just hit [Esc] and type :q! to quit without saving. Then make another attempt.

Was this article helpful?

0 0

Post a comment