How to find and/or print sudo’s lecture file

sudo

I'm using Ubuntu and I would like to find and/or print the sudo lecture that is printed to the screen the first time a user executes a sudo command. How can I do this? I'm unable to find the lecture file.

Best Answer

See man sudoers

lecture_file
Path to a file containing an alternate sudo lecture that will be used in place of the standard lecture if the named file exists. By default, sudo uses a built-in lecture.

So, if you wish to change the text, add it to a file and point to it from /etc/sudoers:

Defaults        lecture_file = /etc/sudoers.lecture

According to the change log for Ubuntu Qantal, sudo is now compiled --without-lecture.

The default text, when compiled in, is:

#define DEFAULT_LECTURE "\n" \
"We trust you have received the usual lecture from the local System\n" \
"Administrator. It usually boils down to these three things:\n\n" \
" #1) Respect the privacy of others.\n" \
" #2) Think before you type.\n" \
" #3) With great power comes great responsibility.\n\n"
Related Question