Grant sudo permissions to common users (Linux)

Source: Internet
Author: User

Granting sudo permissions to common users (Linux) sudo is a common tool in linux that allows common users to use superuser permissions. Add sudo before the Super User permission, for example, sudo vim/xxxxxxxxxx, and then the system prompts you to enter the password. After the password is correct, you can edit it like root, the advantage of doing so is that it is safer. The following describes how to configure sudoers: the configuration file of the sudo function is generally located here:/etc/sudoers, which can be edited using the rule do. The advantage is that if the rule write does not meet the requirements, you will be prompted, the downside is calling out the nano Editor, which is quite difficult. In addition, the comment in the configuration file of/etc/sudoers also shows that it is not recommended to directly modify/etc/sudoers, but through/etc/sudoers. d/Add a file in the folder to complete the configuration. Please consider adding local content in/etc/sudoers. d/instead of directly modifying this file. you can use vi to edit the new file. For example, if you want to add sudo permissions to mantou, you can add a file. The file name does not matter. The content is mantou ALL = (ALL) ALL to save, log out of vi and set the File Permission to 400: chmod 400 mantou and then use the mantou user to log on to sudo.

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.