新创建的用户不能使用sudo 命令

如题所述

第1个回答  2022-06-20
假设你用的是Red Hat系列(包括Fedora和CentOS)的Linux系统。当你执行sudo命令时可能会提示“某某用户 is not in the sudoers file.  This incident will be reported.”

当然如果你理解上面的原理后,可以直接输入如下命令解决此问题

su -

echo 'xxx ALL=(ALL) ALL' >> /etc/sudoers  (其中xxx代表用户名)
相似回答