How to add a lecture that appears every time sudo is run.

To add a lecture that appears when sudo is run to remind a user to be careful, just run the sudo visudo command and add these two lines to the /etc/sudoers file. Defaults lecture="always" Defaults lecture_file="/root/lecture"Defaults lecture="always" Defaults lecture_file="/root/lecture" Save the file and then add this text to the /root/lecture file. root@Yog-Sothoth:~# cat lecture 1) … Read more

How to have a custom message appear each time sudo is used.

This is how to have a custom lecture appear each time a user executes the sudo command to remind them to be careful with it. Run the visudo command as root and add these lines to the /etc/sudoers file. Defaults lecture="always" Defaults lecture_file="/home/jason/lecture"Defaults lecture="always" Defaults lecture_file="/home/jason/lecture" Then create the /home/jason/lecture file and put this in … Read more