问题.  xxx is not in the sudoers file. This incident will be reported.(当想要以 xxx的身份切换到root权限时,使用sudo su命令,并按提示输入 *** 的密码后出现的错误提示)
解决方案1.修改sudoer文件,使得能够使用sudo命令

su  (切换到root用户下);
输入root用户密码;
ls -l /etc/sudoers (查看sudoers文件)
chmod u+w /etc/sudoers(给root用户增加写权限);
ls -l /etc/sudoers (查看sudoers文件)
vim /etc/sudoers(打开sudoers文件)然后在 root ALL=(ALL) ALL 后面加上 XXX ALL = (ALL) ALL,其中XXX表示你的用户名,保存之后推出
chmode u-w /etc/sudoers (恢复sudoers文件原来的读写权限)
ls -l /etc/sudoers (查看sudoers文件)
exit(退出root用户)
如此,就可以在xxx用户下使用sudo来做root权限的事情啦。