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.
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
Defaults lecture_file = /etc/sudoers.lecture
According to the change log for Ubuntu Qantal,
sudo is now compiled
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"
The lecture text is compiled into the sudo binary. Issuing the following
strings command will output the default lecture text.
strings /usr/bin/sudo | grep -A4 "usual lecture"