天天看點

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

參考部落格:

https://blog.csdn.net/sinat_36118270/article/details/62899093

目前登陸使用者,無權限問題。

root模式下編輯   /etc/sudoers  檔案,添加目前使用者。

詳細步驟:

1.切換到root使用者下

  方法為直接在指令行輸入:su,然後輸入密碼(即你的登入密碼,且密碼預設不可見)。

2./etc/sudoers檔案預設是隻讀的,對root來說也是,是以需先添加sudoers檔案的寫權限,指令是:

即執行操作:chmod u+w /etc/sudoers

3.編輯sudoers檔案

即執行:vi /etc/sudoers

找到這行 root ALL=(ALL) ALL,在他下面添加xxx ALL=(ALL) ALL (這裡的xxx是你的使用者名)

作者:小烏龜

出處:http://www.cnblogs.com/music-liang/

【轉載請注明出處,歡迎轉載】 希望這篇文章能幫到你