sudo"xxx is not in the sudoers file"

用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。下面是修改方 法:
 
su -
chmod u+w /etc/sudoers
vim /etc/sudoers,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"xxx ALL=(ALL) ALL"(这里的xxx是你的用户名)
chmod u-w /etc/sudoers
 





posted @ 2015-09-08 13:15  iAthena  阅读(224)  评论(0编辑  收藏  举报