xxxx is not in the sudoers file. This incident will be reported. 解决方法
使用 sudo
命令时出现 xxxx is not in the sudoers file. This incident will be reported. 这里的xxxx是你的用户名;出现这个提示通常是用户名没有写入到 sudoers 文件中;

解决方法
先使用 su
命令切换到 root 用户:
su
然后编辑 /etc/sudoers
,按下图添加一行文本:

注意这里的 h0cn
应该替换成你的用户名;
如果使用的是vim编辑器,请使用 qw!
保存并退出。
如需转载,请注明出处;本文地址:https://www.perfcode.com/p/xxxx-is-not-in-the-sudoers-file.html