[sudo-users] Disable credential caching at the user level

Todd C. Miller Todd.Miller at millert.dev
Tue Dec 27 15:28:52 MST 2022


On Tue, 27 Dec 2022 16:30:43 -0500, Jason Franklin wrote:

> Is it possible to disable credential caching at the user level even if
> the system policy allows it?
>
> I would like the ability to disable "sudo" credential caching for my
> user with my dotfiles without having to bother the admin or alter site
> policy.

I suppose you could alias sudo to "sudo -k".  For example:

    alias sudo="sudo -k"

That would only work for interactive use and not in shell scripts.
Using a shell function instead of an alias is another option.

 - todd


More information about the sudo-users mailing list