"xxx is not in the sudoers file"解决方法

1.进入root模式

2.添加写权限: chmod u+w /etc/sudoers

3.编辑sudoers文件: vi /etc/sudoers

4.在root ALL=(ALL) ALL这行下面添加一行xxx ALL=(ALL) ALL(xxx是你的用户名)

5.删除写权限: chmod u-w /etc/sudoers

原文地址:https://www.cnblogs.com/live41/p/2501558.html