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

我已经将新用户添加到组wheel 。 我可以用这个用户名和密码login到机器,并确认它属于这个组:

 [[email protected] ~]$ groups newuser wheel 

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

 [[email protected] ~]$ sudo ls -lt /root [sudo] password for newuser: newuser is not in the sudoers file. This incident will be reported. 

visudo确认组中的用户应该拥有这些权限:

 ## Allows people in group wheel to run all commands # %wheel ALL=(ALL) ALL ## Same thing without a password # %wheel ALL=(ALL) NOPASSWD: ALL 

所有的教程都指出,向这个组添加一个用户就足够了。 我还有什么要做的?

PS:这是一台亚马逊Linux机器

sudoers文件中的wheel条目被注释掉了,所以group wheel根本没有sudo访问权限。

从行中删除#

 %wheel ALL=(ALL) ALL