300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > 解决xx is not in the sudoers file. This incident will be reported.问题

解决xx is not in the sudoers file. This incident will be reported.问题

时间:2018-08-12 08:13:35

相关推荐

解决xx is not in the sudoers file. This incident will be reported.问题

问题. xxx is not in the sudoers file. This incident will be reported.(当想要以 xxx的身份切换到root权限时,使用sudo su命令,并按提示输入 *** 的密码后出现的错误提示)

解决方案1.修改sudoer文件,使得能够使用sudo命令

su (切换到root用户下);

输入root用户密码;

ls -l /etc/sudoers (查看sudoers文件)

chmod u+w /etc/sudoers(给root用户增加写权限);

ls -l /etc/sudoers (查看sudoers文件)

vim /etc/sudoers(打开sudoers文件)然后在 root ALL=(ALL) ALL 后面加上 XXX ALL = (ALL) ALL,其中XXX表示你的用户名,保存之后推出

chmode u-w /etc/sudoers (恢复sudoers文件原来的读写权限)

ls -l /etc/sudoers (查看sudoers文件)

exit(退出root用户)

如此,就可以在xxx用户下使用sudo来做root权限的事情啦。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。