Change the default timeout time of sudo on Ubuntu

Source: Internet
Author: User
For the sake of security, Ubuntu will disable the root account by default from the beginning of system installation. All operations that require the administrator can be replaced by The sudo command. The default sudotimeout time of Ubuntu is 5 minutes. Of course, if you feel that the time is too short or you are tired of entering the password, you can change the default timeout time of sudo as follows: sudodomaindo find the following line defasensenv_res

For the sake of security, Ubuntu will disable the root account by default from the beginning of system installation. All operations that require the administrator can be replaced by The sudo command. The default sudo timeout time of Ubuntu is 5 minutes. Of course, if you think the time is too short or you are tired of entering the password, you can change the default timeout time of sudo as follows:

Sudo shortdo

Find the following line

Defaults env_reset

Change this behavior as follows

Defaults env_reset, timestamp_timeout = x

X represents the time. You can set it to 10 or 30, indicating 10 minutes or half an hour.

You can also set it to-1, so that you will remember the password before logging out or exiting terminal. In this case, you can run the following command to forcibly exit sudo for security considerations.

Sudo-K

For more tips, see man sudo

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.