CentOS User Rights modification

Source: Internet
Author: User

First, the cause of the problem

Today, the centos6.5 system is installed with a graphical interface. But don't want to reload into mini version. All ready to modify system problems, let the system boot automatically into the command mode.

Second, the error prompt

Login is a normal user, modify the/etc/inittab file

The last line defaults to:

Id:5:initdefault: #默认进入图像界面

As long as the 5 modified to 3 can be turned on automatically into the Chitian line mode.

However, you receive a prompt when you save the changes:

XXX is not in the sudoers file. This incident would be reported.

Iii. Solutions

Modify the/etc/sudoers file. Ordinary users can not modify the file, you need to switch to the root user.

1,/etc/sudoers file is read-only file, you need to first modify the file permission properties

chmod u+w/etc/sudoers

2, Vim/etc/sudoers, find the following information:

# allow ROOT to run any commands anywhere

Root all= (All) all

Add a line under Root, where Leo is your user name. After modifying Wq save exit.

Leo All= (All) all

3. Cancel Write permission after modification

chmod u-w/etc/sudoers

Four: After the modification you use Su-can get root permissions (su user name #切换用户)



This article is from the "very strong ant" blog, make sure to keep this source http://leozhang2016.blog.51cto.com/9419901/1731378

CentOS User Rights modification

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.