If you are looking for software to use, go to Huajun Software Park! software release
Location: front pageTutorial strategyTutorialComputer software tutorials Ubuntu system...

How to modify the default timeout of sudo in Ubuntu system?

Author: Xiaoyuer Date: 2017-05-12

Sudo
Sudo-1.8.31p1 official version

system tools Storage size: 3.5MB Time: 2010-08-02

Software introduction: The official version of Sudo (superuser do) allows system administrators to allow specific users to run some programs that can only be run with root privileges...

Download now

Due to system security concerns, Ubuntu systems generally disable the root account by default during installation, and use the sudo command to replace all operations that require an administrator. How to modify the default timeout of sudo in Ubuntu system? Below, the editor of Huajun has summarized the methods, hoping to help you.

How to modify the default timeout of sudo in Ubuntu system?

Here's how:

sudo visudo

Find the following line

defaults env_reset

Change this behavior like this

Defaults env_reset, timestamp_timeout=x

x represents the time, you can set it to 10 or 30, which means 10 minutes or half an hour.

You can also set it to -1 so that the password will be remembered when you log out or exit the terminal. When doing this, sometimes for security reasons, you can also run the following command to force quit sudo.

sudo -K

The above is the method to modify the sudo default timeout time in Ubuntu system. If your timeout time is not long enough, then quickly try the above method to modify the default time. Hope this helps.

Related articles