Add a common user to The sudo list in Linux.

Source: Internet
Author: User

Add a common user to The sudo list in Linux.
Preface

Linux users (uid> = 500) do not have the permission to execute certain commands. to execute commands with higher permissions, there are two methods:

The first is to use the su-command to switch to the root user for execution;

Another method is to add sudo to execute the command.

 

Edit File

Before using sudo to execute the command, you need to add this common user to the/etc/sudoers file:

1. Switch to the root user and run the cmddo command to enter vim. The/etc/sudoers file is opened.

2. Enter "/root" to search and find"Root ALL = (ALL) ALL"In this line, press" yyp "to get a copy of a row and change it"Username ALL = (ALL) ALL"," Username "is the user name to be added.

(If you do not want to enter the user password when using sudo, change it"Username ALL = (ALL) NOPASSWD: ALL")

3.: Save and exit x.

 

Reference link: [Debian] add normal users to sudoer

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.