Linux adds sudo permissions to the user:

Source: Internet
Author: User

Linux adds sudo permissions to the user:

The root user for Linux is the Almighty God, any file can enter, any file can be modified, for our rookie is really dangerous ah

So there are times when you need to give the user sudo permissions

Enter Super User mode. That is, enter "Su-", the system will let you enter the super user password, enter the password and enter the Super User mode. (Of course, you can also use root directly)
Adding sudo permissions for a user is to add a/etc/sudoers file
Ouyangjun all= (All) all such a sentence
The default owner of this file has only R permissions, so you need to add w before modifying
chmod u+w/etc/sudoers

Edit the/etc/sudoers file, that is, enter the command "Vim/etc/sudoers", enter the edit mode, find this line: "Root all= (All) all" in the following add
Ouyangjun all= (All) all (here Ouyangjun is your user name), and then save the exit.
If you want to avoid entering your password:
Ouyangjun all= (All) Nopasswd:all

Revoke write permissions for the file. That is, the input command
chmod u-w/etc/sudoers

Then it's all right.

This article is from the "Ouyangjun" blog, make sure to keep this source http://ouyangjun.blog.51cto.com/10284323/1710774

Linux adds sudo permissions to the user:

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.