Solution to sudo password error

Time:2020-2-13

Situation: when the non root user uses sudo command, the password error is always reported. Add configuration in / etc / sudoers to solve this problem
However, / etc / sudoers only has write permission for root user. Before operating the file, add write permission first

su
chmod u+w /etc/sudoers
vim /etc/sudoers

Write in file

username ALL=(ALL)  ALL

Then WQ saves and exits

chmod u-w /etc/sudoers
exit

Some predecessors suggested using visudo instead of vim editor

Recommended Today

Mac docker creates the first Django application, Part 1

Mac docker creates the first Django application, Part 1 Step 1: build Django container on MAC Original: QuickStart: compose and DjangoTranslation: CK This article will guide you how to use docker compose to configure and launch a simple Django + PostgreSQL application. Make sure you have compound installed:Install Docker Compose Define your project components You […]