Troubleshooting the sudo command problem with Linux

Source: Internet
Author: User
Problem description

The following error is prompted when executing the sudo command in the terminal after logging in with a normal user:

We Trust you are received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) with great power comes great responsibility.

Workaround one, switch to the root user

The terminal executes the su command, then enters the password, switches from the normal user to the root user

Ii. Adding Write permissions to the sudoers configuration file

The sudoers file is located in the /etc directory and is a read-only configuration file for the system configuration sudo user. Execute the command under root chmod +w /etc/sudoers to add Write permission to the file.

Third, edit the sudoers configuration file

Executes vi /etc/sudoers a command to edit the configuration file. Find it in the file first

Allows people in group wheel to run all
Commands

This configuration, and then add the user with the required permissions in the new row below the configuration, in the sudo following format

User name all= (all) all

Troubleshooting the sudo command problem with Linux

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.