小编rho*_*nan的帖子

尽管用户属于轮组,但“用户不在 sudoers 文件中”

我已经向组中添加了一个新用户wheel。我可以使用此用户和密码 ssh 进入机器并确认它属于该组:

[newuser@xxx.xxx ~]$ groups
newuser wheel
Run Code Online (Sandbox Code Playgroud)

但是,如果我尝试使用 root 权限运行任何东西:

[newuser@xxx.xxx ~]$ sudo ls -lt /root
[sudo] password for newuser:
newuser is not in the sudoers file.  This incident will be reported.
Run Code Online (Sandbox Code Playgroud)

visudo确认组中的用户wheel应具有以下权限:

## Allows people in group wheel to run all commands
# %wheel        ALL=(ALL)       ALL

## Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL
Run Code Online (Sandbox Code Playgroud)

所有教程都说将用户添加到该组就足够了。我还需要做什么?

PS:这是一个amazon-linux机器

linux root users sudo

2
推荐指数
1
解决办法
2524
查看次数

标签 统计

linux ×1

root ×1

sudo ×1

users ×1