Fedora提示 xxxis not in the sudoers file.this incident will be

來源:互聯網
上載者:User

 

由於Fedora預設不添加使用者到sudoers,因此當我們使用sudo時就會出現“is not in the sudoers file.”的錯誤。

 

添加方法如下:

 

1.進入root模式

su - 

注意:su和-之間有空格

輸入目前使用者的密碼

 

2.添加寫入權限

chmod u+w /etc/sudoers

 

3.將自己加入到sudoers中

 

gedit /etc/sudoers

 

注意此處使用的是gedit,如果你熟悉vi,vim也可以使用,不過對於我這個初學者來說gedit對於解決問題來說還是很方便的

 

進入之後,搜尋root

看到這樣的一行:root ALL=(ALL)  ALL

在下面填上類似的資訊,例如你的使用者名稱字叫user 則添加:user ALL=(ALL)   ALL

添加好後儲存

 

4.撤銷寫入權限

chmod u-w /etc/sudoers

 

OK,問題應該能解決

 

 

摘自 firefoxbug的專欄

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.