In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 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 configure sudo commands under Linux to run without entering a password. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
This setting is done in the / etc/sudoers file, which is the default security policy using the sudo command; in the user rights assignment section.
Important: in the sudeors file, the authenticate parameter turned on by default is used for verification purposes. If it is set, the user must authenticate with a password (or other authentication method) before running the command using sudo.
However, you can use the NOPASSWD (no password is required when the user invokes the "sudo" command) flag to override this default.
The syntax for configuring user permissions is as follows:
User_list host_list=effective_user_list tag_list command_list
Where:
User_list-list of users or user aliases that have been set up. Host_list-list of hosts or host aliases on which users can run sudo. Effective_user_list-list of users running under that user or alias tag_list-list of tags, such as NOPASSWD. Command_list-A list of commands or command aliases that the user runs using sudo.
To allow users (aaronkilik in the following example) to run all commands without entering a password using sudo, open the sudoers file:
$sudo visudo
Add the following line:
Aaronkilik ALL= (ALL) NOPASSWD: ALL
For groups, use% characters before the group name; this means that all members of the sys group can use sudo without a password.
% sys ALL= (ALL) NOPASSWD: ALL
To allow the user to run the specified command (/ bin/kill) without a password using sudo, add the following line:
Aaronkilik ALL= (ALL) NOPASSWD: / bin/kill
The following line allows members of the sys group not to enter a password when running the command: / bin/kill, / bin/rm using sudo:
% sys ALL= (ALL) NOPASSWD: / bin/kill, / bin/rm
Run sudo without a password
This is the end of this article on "how to configure sudo commands under Linux to run without entering a password". I hope the above content can be of some help 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.