Configure sudo permissions on Linux for the first time

Source: Internet
Author: User

What is sudo permission, online is a lot of

Mainly because the root authority is too large, afraid of the wrong operation, so sudo permissions appear, of course, I personally see the online documentation is said

Configuration environment: Centos7

First log in to the system with root privileges

Then configure the sudoers file under the ETC directory

Then first give the sudoers file, write the permission, chmod o+w/etc/sudoers

Why write permission, because there is no permission to write, and so on can not save, tell the novice listen to, the great God skipped

And then we use VI to open the sudoers file.

We'll find it when we open it.

Root all= (All) all

This line

And then add the following under it

"User name" all= (All) all

That's probably it.

OK, then we're under permission, chmod o-w sudores.

Why do you want to under permission, because no permissions, wait for sudo, there will be an error

Let's test it out for ourselves.

Configure sudo permissions on Linux for the first time

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.