Test Test How to make lecture show up forever in sudo | Çınar Mert Çeçen - Blog
Skip to content
Go back

How to make lecture show up forever in sudo

if you love the “With great power comes great responsibility” message and want to see it every time you run a command, this is how you achieve that:

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

  1. open the /etc/sudoers file.
sudo visudo
  1. add the following to the end of the file:
Defaults lecture="always"
  1. save and exit the file.

you might need to kill your existing sudo 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 insult users who mistype their password. in either case, click the relevant link.


Share this post on:

Previous Post
How to show asterisks when typing sudo password
Next Post
How to insult users who mistype their sudo password