I have sudo set to show the usual lecture on its first use by a user. Without thinking, I accidentally triggered its display for a new user as I was setting them up, and now it's been shown, they won't get to see it again.

How does sudo know that a user has invoked it once before? I'd like to reset that so that this user will see the message first time they use it. I don't want to set it so that the lecture appears on every invocation - once is enough - I'd just like sudo to forget that it's already been shown once.

Any ideas how I do that?

link|improve this question
feedback

1 Answer

up vote 3 down vote accepted

On Debian, a user's first use of sudo will create a directory under /var/run/sudo/. The directory is will be named username, where username is the name of the user which ran sudo.

Removing [or renaming] this directory will cause the lecture to be displayed upon next use of sudo, as well as recreate the directory.

For example, the directory for my user account would be /var/run/sudo/jscott.

link|improve this answer
Thank you. On my server, I found the directory at /var/lib/sudo, and removing the user's directory from there did indeed do the trick. – dopiaza Nov 22 '11 at 13:44
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.