1. 程式人生 > >is not in the sudoers file"

is not in the sudoers file"

  • 解決方法: 
    1.切換到root使用者

    su -
    • 1

    2.新增檔案讀寫許可權

    chmod u+w /etc/sudoers
    • 1

    3.開啟檔案

    vim /etc/sudoers
    • 1

    注:如果沒有vim,請通過apt-get install vim安裝。

    4.找到root ALL=(ALL) ALL並在此行下方新增:

    [使用者名稱] ALL=(ALL) ALL
    • 1

    5.刪除檔案讀寫命令

    chmod u-w /etc/sudoers