1. 程式人生 > >xxx is not in the sudoers file. This incident will be reported的解決方法

xxx is not in the sudoers file. This incident will be reported的解決方法

    2>、新增檔案的寫許可權。也就是輸入命令"chmod u+w /etc/sudoers"。
    3>、編輯/etc/sudoers檔案。也就是輸入命令"vim /etc/sudoers",輸入"i"進入編輯模式,找到這一 行:"root ALL=(ALL) ALL"在起下面新增"xxx ALL=(ALL) ALL"(這裡的xxx是你的使用者名稱),然後儲存(就是先按一 下Esc鍵,然後輸入":wq")退出。
    4>、撤銷檔案的寫許可權。也就是輸入命令"chmod u-w /etc/sudoers"。