您的位置:首页 > 其它

Ubuntu下is not in the sudoers file 问题解决

2015-06-11 15:13 453 查看
在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)-> 重启

这时我知道的两种方法,若有其他方法,请大神留言告之。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: