用sudo時提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是當前用戶名,也就是當前用戶沒有權限使用sudo,只要修改一下/etc/sudoers文件就行了。修改方法:
1) su -
2)chmod u+w /etc/sudoers
3)vi /etc/sudoers, 找到這一 行:"root ALL=(ALL) ALL" 在起下面添加"xxx ALL=(ALL) ALL"(這裏的xxx是用戶名),保存退出。
4)chmod u-w /etc/sudoers