You can prevent sudo from remembering your password with a sudoers entry: Defaults timestamp_timeout = 0. You may change 0 to any number representing the minutes you may want your password to be “remembered”, or let in 0 so you will need to type your password each time you type sudo
Write a logout shell script and include "sudo -K" to clear the cache on logout.
© 2025 One Identity LLC. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center