Linux sudoers

普通用户执行 sudo 以root用户身份来执行命令。

将普通用户加入sudoers组

在 root ALL=(ALL) ALL下添加
username  ALL=(ALL) ALL

sudo 不想输入密码    %wheel ALL=(ALL)       NOPASSWD: ALL   注释这个。

gpasswd -a username   wheel   执行这个加入wheel组。

原文地址:https://www.cnblogs.com/jkklearn/p/7699396.html