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