Home  >  Article  >  Operation and Maintenance  >  Ordinary users under centos execute the sudo command and prompt that the permissions are insufficient.

Ordinary users under centos execute the sudo command and prompt that the permissions are insufficient.

王林
王林Original
2020-03-26 17:17:314225browse

Ordinary users under centos execute the sudo command and prompt that the permissions are insufficient.

Solution:

Switch to the root user first, and then modify the file:

[daixiang@localhost ~]$ su root
Password: 
[root@localhost daixiang]# vim /etc/sudoers

(Recommended tutorial: centos tutorial )

We need to modify the sudoers file and add the user name to the file:

In command line mode, move the cursor to the beginning of the root ALL=(ALL) ALL line and press yy to copy the line. , press p on the next line to paste, and change root to the user name that needs to be given sudo permissions.

Note that you need to force save and exit (:wq!) when exiting.

Ordinary users under centos execute the sudo command and prompt that the permissions are insufficient.

Recommended related video tutorials: linux video tutorial

The above is the detailed content of Ordinary users under centos execute the sudo command and prompt that the permissions are insufficient.. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn