赞
踩
如图,在终端执行sudo命令时,系统提示
is not in the sudoers file. This incident will be reported.
原因就是当前的用户没有加入到sudo的配置文件里
解决方法:
- #切换到root用户
- su
- #编辑配置文件
- vim /etc/sudoers
- #找到root ALL=(ALL) ALL, 在下面添加一行, xxx是用户名称
- xxx ALL=(ALL) ALL
注意这个文件是只读的
因此需要使用:wq!强制保存
然后重新执行命令就OK了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。