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

原因:首先说一下,大家为什么会走到这一步呢,不用说了,肯定是在装系统或者买服务器的时候没有将admin账号加入用户组,使用sudo命令的时候,出现这个情况:
       admin is not in the sudoers file. This incident will be reported

处理方式
第一步:切换到root用户下 
        su -,接着输入root用户的密码

第二步:添加sudo文件的写权限,命令是: (记得w后面有空格)
       chmod u+w /etc/sudoers

第三步:编辑sudoers文件 
       vi /etc/sudoers
找到这行 root ALL=(ALL) ALL,在他下面添加xxx ALL=(ALL) ALL (这里的xxx是你的用户名

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

撤销sudoers文件写权限,命令: 

       chmod u-w /etc/sudoers