In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "Linux how to customize sudo password session timeout", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "Linux how to customize sudo password session timeout" article.
The sudo command is a permission delegated command, which can grant root permissions to ordinary users. It is very common in practical applications. By default, the sudo command session time is 5 minutes.
To set the sudo password timeout value, use the passwd_timeout parameter.
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.
The above is about the content of this article on "how Linux customizes the timeout of sudo password sessions". I believe we all have some understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.
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.