网上查过说是在终端执行:sudo gedit /etc/sudoers Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification root ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges min ALL=(ALL:ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL) ALL xx ALL=(ALL) ALL (将此处的XX修改为出现改问题的用户名!) 保存文件退出即可解决 ,可遇到问题,sudo为系统只读文件,需要改为读写文件?怎样解决呢,求相助,谢谢 ====================================================================== 谢谢大神,已经解决,切换到root权限下,也无法修改系统只读文件sudoers,需把sudoers文件改为读写 #chmod 740 /etc/sudoers 然后再修改sudoers文件,搞定了,谢谢! |
|
来自: 海漩涡 > 《Ubuntu虚拟机配置》