How to change the number of minutes that the sudo password is cached

When you run any command as root, using sudo, the password is remembered for 15 minutes by default.
If you want to change the time that the password is cached, open the terminal (as root) and run:

[precode]nano /etc/sudoers [/precode]

Search for this line:

[precode]defaults env_reset[/precode]

And change it into:

[precode]defaults env_reset , timestamp_timeout=x[/precode]

where “x” is the time in minutes that the password will be cached.

Save and exit and work is done!

 

3 comments for “How to change the number of minutes that the sudo password is cached

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.