xxx is not in the sudoers file. This incident will be reported

xxx is not in the sudoers file. This incident will be reported

使用sudo的时候,出现提示xxx is not in the sudoers file. This incident will be reported

error-msg

where is sudoer

发现原来是xxx没有sudo权限。解决办法如下:

  1. 切换到使用root账户
  2. 添加/etc/sudoers文件的写权限。
  3. 编辑/etc/sudoers,找到root ALL=(ALL) ALL,在后面添加xxx ALL=(ALL) ALL
  4. 撤销/etc/sudoers文件的写权限

这样一来,xxx用户就有sudo权限了💪

Show Comments