xxx is not in the sudoers file


今天在ubuntu8.10遇到一個問題,終端輸入sudo -i,有以下輸出:
xxx@xxx-desktop:~$ sudo -i
[sudo] password for xxx:
xxx is not in the sudoers file. This incident will be reported.

當使用 「su -「進行切換時又出現su: Authentication failure錯誤
xxx@xxx-desktop:~$ su -
Password:
su: Authentication failure
xxx@xxx-desktop:~$

請教各位如何解決這個問題,先謝謝了ubuntu

 

解決方法:ide

默認只有安裝時設置的用戶纔有sudo權力。

新建的用戶沒有。
若是不當心把安裝時設置的用戶刪了,
能夠到恢復模式中使用root來添加你要的用戶sudo權力,用visudo。

若是你沒有刪掉你在安裝時設置的用戶,能夠su THAT_USER,變成那個用戶,而後用它來添加當前用戶的sudo權力。

添加sudo權力的方法:加入admin組。ci

相關文章
相關標籤/搜索