CentOS7 SUDO 笔记--没配置sudoer,为什么有的账号能用sudo命令,有的不能用
时间:2019-07-24 17:43:10
收藏:0
阅读:352
原来:
一、安装linux 创建的用户默认在 wheel组里。
1. 使用 cat /etc/passwd 查看用户所在组。中间那个数字是 groupid 不太好看
2、使用 cat /etc/group 查看组用户。 group 最后面是该组有哪些用户
二、 该组在 /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
评论(0)