Minimal installation of CentOS 7, there is a lot of work to do, but found that as a normal user, nothing can be done. At least sudo su is not a drop.
Workaround: Switch to the root user into the/etc directory to edit sudoers, add account to sudoers.
Vi/etc/sudoers
Find root all= (all) all
Add user name All= (all) all
650) this.width=650; "alt=" Picture "src=" http://a4.qpic.cn/psb?/V12G3U2V3Mf1Kv/ gwnposf7dvbaogols39yu7nhhexblxvowzuwyzi1rrg%21/b/dlmqd29lqgaa&ek=1&kp=1&pt=0&bo= Dwmtagaaaaabaaq%21&su=0188024225&sce=0-12-12&rf=2-9 "style=" WIDTH:783PX;HEIGHT:557PX; "/> Supplementary knowledge point one:
VI find command, in command mode:
/pattern<enter>: Look down for the pattern match string example:/all=
Pattern<enter>: Look up the pattern match string example:? All=
After using the Find command, use the following two keys to quickly find:
N: Continue searching in the same direction
N: Search in the opposite direction
Supplementary Knowledge Point two:
Change file read-only, General save Exit Command ": Wq" is not saved, must ": x!"
Finally logout and switch to the normal user, try Sudo!
This article is from the "Deadwood Self-Carving" blog, please be sure to keep this source http://321602.blog.51cto.com/311602/1682834
CentOS7 adding a normal user to the Sudoers Administrators group