De man sudoers
sudoers uses time stamp files for credential caching. Once a user has
been authenticated, the time stamp is updated and the user may then use
sudo without a password for a short period of time (5 minutes unless
overridden by the timeout option).
timestamp_timeout
Number of minutes that can elapse before sudo will ask
for a passwd again. The timeout may include a frac-
tional component if minute granularity is insufficient,
for example 2.5. The default is 5. Set this to 0 to
always prompt for a password. If set to a value less
than 0 the user's time stamp will never expire. This
can be used to allow users to create or delete their
own time stamps via ''sudo -v'' and ''sudo -k'' respec-
tively.
Isso significa que você pode executar visudo
e adicionar esta linha:
Defaults timestamp_timeout=0
Com esse valor, podemos ver que não há armazenamento em cache de credenciais:
$ sudo id
[sudo] password for sweh:
uid=0(root) gid=0(root) groups=0(root)
$ sudo id
[sudo] password for sweh:
uid=0(root) gid=0(root) groups=0(root)
$