首页 > 其他 > 详细

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

时间:2019-07-24 17:43:10      阅读:352      评论:0      收藏:0      [点我收藏+]

 

原来:

一、安装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

 

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!