Ubuntu下isnotinthesudoersfile问题解决

本文发布时间: 2019-Mar-22
在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)-> 重启这时我知道的两种方法,若有其他方法,请大神留言告之。


(以上内容不代表本站观点。)
---------------------------------
本网站以及域名有仲裁协议。
本網站以及域名有仲裁協議。

2024-Mar-04 02:09pm
栏目列表