Grant root permissions to common users

Source: Internet
Author: User

When you start using Linux, you may encounter user permissions. For example, when installing the software, you will often be prompted that the permission is insufficient. The following describes how to grant root permissions to common users.

Find CD/etc/sudoers and you can see that the user's permission is: only the read permission (the following operations use the root user)

 
-R -- r -----. 1 Root 4029 Jul 22 19: 41 sudoers

After entering vim, the system prompts that only the read permission is available.

 
# Allows members of the Users Group to shutdownThisSystem #% Users localhost =/sbin/shutdown-H now-- Insert -- W10: Warning: ChangingReadonlyFile

Grant the sudoers read and write permission to the file: chmod 640/etc/sudoers

 
-RW-r -----. 1 Root 4029 Jul 22 :41 sudoers

Find the root user.

# Allow root to run any commands anywhere root all=(All) allhadoop all= (All) All

Hadoop is my new user. Save

Then modify the file to have only the read permission: chmod 440/etc/sudoers

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.