# xxxx is not in the sudoers file.This incident will be reported
报错的意思是没有权限使用sudo
### 解决方法(以下命令在root用户下执行)
#### 1.授予写权限
```
chmod u+w /etc/sudoers
```
#### 2.添加权限
找到```root ALL=(ALL) ALL```这行
根据你的需要在下面添加以下任意一条:
```
yourusername ALL=(ALL) ALL
%yourusername ALL=(ALL) ALL
yourusername ALL=(ALL) NOPASSWD: ALL
%yourusername ALL=(ALL) NOPASSWD: ALL
```
如果你能看懂英文,上面这些在文件注释中都说明了
#### 3.撤销写权限
```
chmod u-w /etc/sudoers
```
现在,你的用户就可以使用sudo了
xxxx is not in the sudoers file.This incident will be reported