歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu下is not in the sudoers file 問題解決

Ubuntu下is not in the sudoers file 問題解決

日期:2017/2/28 14:00:51   编辑:Linux教程

在Ubuntu12.04 下,使用sudo apt-get install XXX 時,突然跳出 username is not in the sudoers file的問題

然後我一查此username的類型,果然是標准用戶而不是管理員用戶

解決這個問題至少有兩種方法:

一。System Settings ->User Accounts -> 點擊Unlock ->輸入root密碼 -> 修改AccountType(用戶類型)為Administrator(管理員) -> 重啟

二。

root用戶下,修改/etc/sudoers的權限為640(chmod 640 /etc/sudoers) -> vim /etc/sudoers -> 找到root ALL=(ALL:ALL) ALL ->添加

username ALL=(ALL:ALL) ALL -> 修改/etc/sudoers的權限為440(chmod 440 /etc/sudoers)-> 重啟

這時我知道的兩種方法,若有其他方法,請大神留言告之。

更多Ubuntu相關信息見Ubuntu 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=2

Copyright © Linux教程網 All Rights Reserved