Hello Guys,
I am back with another sudo tweak ð . This time I am trying to avoid frequent password requirements while doing sudo by changing the sudo password interval time.
As a Linux user sudoing will be familiar with every one. When run sudo command for the first time it will ask for our password. Now have you noticed that in some systems when you run the sudo command second time it asks for password and in other system it won’t.
This left me bewildered. So I went after it to find why this is happening and landed up with this tweak ð
So let’s get started.
What are we trying to do here?
We will be increasing the time interval for password prompt. So once we provide password when running sudo, it won’t ask you password if you run another sudo command within that time interval.
How to do this?
First we open the â/etc/sudoersâ file and change a setting to customize the length of the grace period. Run following command
sudo visudo
Enter your password when prompted and the file is opened. Now search for following
Defaults    env_reset
Edit it to look like
Defaults    env_reset, timestamp_timeout=x
“x” is the number of minutes you want sudo to wait in the same Terminal session before prompting you to enter your password again.
Now save the file, close the terminal and open a new one. From now on once you provide password for a sudo command it will not prompt you for password for next “x” minutes.
Don’t edit /etc/sudoers file directly in any other editor. run sudo visudo to edit it.