Linux User Add Sudoer

Source: Internet
Author: User

Using sudo, you can temporarily gain root privileges when you log on as a non-root user and execute the required commands. Users who can use sudo can be called sudoer.

Add Sudoer method (assuming you have sudo installed): Execute

# Visudo

Or

# Sudoedit

Tips:

Some distributions of sudo provide sudoedit, while others provide Visudo, essentially the same as the functionality. You can also use other editors such as VI to edit/etc/sudoers, but since the file is read-only, force the save (such as w!) or remove the read-only attribute and save it. Find

Root all= (All) all

Add the following

User name all= (all) all

Or

User name all= (all) Nopasswd:all <<-----OK is this thing always forget, write to you today

===========================================================

%adm all= (All) all

If Sudo does not want to enter the password, you can change the sentence to:

%adm all= (All) Nopasswd:all

____________________________________

| Save the file, and then execute |

| |--I've never done this in this box, or I can.

| #gpasswd-A user name ADM |

———————————————

The user can then use sudo.


Linux User Add Sudoer

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.