centos sudo

【CentOS】Sudo提权出现:xx用户不在sudoers文件中解决

假如想象 提交于 2019-12-05 10:19:17
Sudo提权出现:xx用户不在sudoers文件中解决 症状 终端使用sudo提权出现: xx用户不在 sudoers 文件中。此事将被报告。 解决 出现这个问题是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 �min ALL=(ALL:ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL) ALL xx ALL=(ALL) ALL