Changes to the Centos root authority

Source: Internet
Author: User

Method One: Change the/etc/sudoers file,

Find the following line and remove the previous gaze (#)

# # allows people in group wheel to run all commands
%wheel all= (All) all

Then change the user to belong to the root group (wheel),

Commands such as the following:

#usermod-G Root Devuser
After the change is complete, you can now log in with your Tommy account and then use the command su–. You can get root permission to operate.


Method Two: Change the/etc/sudoers file.

Locate the following line. Add a row below root,

For example, see the following:

# allow ROOT to run any commands anywhere
Root all= (All) all
Devuser all= (All) all

Changes completed, can now log in with Devuser account, and then use the command sudo–, you can get root permissions to operate.

Method Three: Change the/etc/passwd file.

Find for example the following line. Change the user ID to 0,

For example, see the following:

Devuser:x:0:33:devuser:/data/webroot:/bin/bash

Changes in Centos root permissions

Related Article

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.