In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how Linux can add users to Sudoers. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Sudoers is the main configuration file of the sudo command. In the / etc directory of the Linux system, you can add ordinary users to sudoers without frequently switching root users to use super permissions.
one。 Switch the login account to the root account to add the user to Sudoers1. Click the user name in the upper right corner and click switch user in the drop-down table
two。 In the switch user interface, click other
3. Enter root, and then enter the password to enter the root user
two。 Add the original ordinary user to sudoers1 under the root user. Open the terminal and type visudo
In the text that appears, type / root and look for the line shown below
Root ALL= (ALL) ALL
After finding the line shown above, pause the cursor on this line, type yy to copy, and then type p, which will be automatically pasted on the next line
two。 Pause the cursor at the root on the copied line, type cw (to replace root), type the account name you want to add, such as: eric, and the result is as follows
Root ALL= (ALL) ALL
Eric ALL= (ALL) ALL
3. Secret-free use sudo if you want to execute the sudo command later without entering a password, you can type NOPASSWD before the all value after the line copied above: the result is as follows
Root ALL= (ALL) ALL
Eric ALL= (ALL) NOPASSWD:ALL
4. Save and exit. After editing, press esc on the keyboard, exit insert mode, and enter command line mode.
Then type: wq to save the exit
5. Switch back to a normal user and try to execute the sudo command
Just type the sudo space in front of the command, such as sudo shutdown-h now to execute the immediate shutdown command.
Note: if the user is not in the sudoers list, you will get the following prompt.
Eric is not in the sudoers file. This incident will be reported.
What are the versions of Linux? the versions of Linux are Deepin, UbuntuKylin, Manjaro, LinuxMint, Ubuntu and so on. Among them, Deepin is one of the best-developed Linux distributions in China; UbuntuKylin is a derivative release based on Ubuntu; Manjaro is a Linux release based on Arch; LinuxMint's default Cinnamon desktop is similar to Windows XP's easy-to-use; Ubuntu is the Linux operating system based on desktop applications.
The above is how Linux adds users to Sudoers. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to 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.