出现这个问题是sudo的配置文件出错,修改sudo的配置文件即可解决 使用su 切换到root,然后终端执行: 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
%admin ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL) ALL
xx ALL=(ALL) ALL (将此处的XX修改为出现改问题的用户名!)保存文件退出即可解决
|