CentOS7 SUDO 笔记--没配置sudoer,为什么有的账号能用sudo命令,有的不能用

原来:

一、安装linux 创建的用户(管理员打钩)默认在 wheel组里。

1. 使用 cat /etc/passwd 查看用户所在组。中间那个数字是 groupid 不太好看

2、使用 cat /etc/group 查看组用户。 group 最后面是该组有哪些用户

本文来自: https://www.cnblogs.com/java2sap/p/11239418.html

 二、 该组在 /etc/sudoers 配置文件中,默认是可以使用sudo的。 

## Allow root to run any commands anywhere
root ALL=(ALL) ALL

## Allows people in group wheel to run all commands

%wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

原文地址:https://www.cnblogs.com/java2sap/p/11239418.html