Linux - how to change the sudo command timeout
Hi,
I often run into a problem where I have a few commands set as an alias in .bashrc. These commands are called under sudo and take a longer time. E.g. the last command is to shut down the machine, also under sudo, and it may not be executed in 99% of cases. Is it possible to change the timeout for the sudo command to be about 60 minutes, so that I do not have to re-enter the sudo password for the standard timeout? Thanks
Hello,
type
Find Defaults env_reset and replace it with:
= to set the sudo timeout to 60 minutes
I often run into a problem where I have a few commands set as an alias in .bashrc. These commands are called under sudo and take a longer time. E.g. the last command is to shut down the machine, also under sudo, and it may not be executed in 99% of cases. Is it possible to change the timeout for the sudo command to be about 60 minutes, so that I do not have to re-enter the sudo password for the standard timeout? Thanks
REPLY
Hello,
type
sudo visudo
Find Defaults env_reset and replace it with:
Defaults env_reset, timestamp_timeout = 60
= to set the sudo timeout to 60 minutes