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

在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下is not in the sudoers file 问题解决

相关文章:

你感兴趣的文章:

标签云: