In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to adjust the sudo command session time under Linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
When using the sudo command to perform administrative tasks in Linux, you may have noticed that even if you just provided the sudo password, you will be asked to provide it again after a period of time. This occurs because of the time limit for your sudo session (the default setting is 15 minutes). If you still enter the sudo command in the same terminal session after 15 minutes, you will be asked to enter your password again.
Edit / etc/sudoers
First open the / etc/sudoers file with root privileges using the sudo and visudo commands, as follows:
$sudo visudo sets timeout time
Then add the following default value, which means that the sudo password prompt will expire 20 minutes after the user uses sudo.
Defaults env_reset,timestamp_timeout=20
Note: you can set the minutes to any time you need, and it will wait until it times out. If you want to pop up the password prompt for each sudo command executed, you can also set the time to 0 or permanently disable the password prompt by setting the value-1.
The screenshot below shows the default parameters I set in the / etc/sudoers file.
Test timeout
Press Ctrl + O to save the file, and then use Ctrl + X to exit. Then, use sudo to run the command and wait 2 minutes to check if the password prompt timed out to test that the settings are normal.
This is the end of this article on "how to adjust the conversation time of sudo commands under Linux". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.