CentOS7 adding a normal user to the Sudoers Administrators group

Source: Internet
Author: User

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

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.