当前位置:   article > 正文

Centos7 执行sudo命令时,系统提示is not in the sudoers file. This incident will be reported.解决办法_cc is not in the sudoers file.

cc is not in the sudoers file.

 

22020309128 信安一班28号 黄宏伟

 

 

d87a95568a474cf5aeea89dd2f2ef603.png

systemctl start NetworkManager.service

打开网络服务

systemctl enable NetworkManager.service

开机启动网络服务

 

 

 

366b3f1e6d9d43c1bdba960e8f4ea951.png

ip同一网段就可以

c345194955614ab6911d1004ea3997c1.png

ip同一网段就可以

78396993549c4d098f002b12777ac24c.png

f41c5053327a4956af453911773ee4b0.png

如图,在终端执行sudo命令时,系统提示

is not in the sudoers file. This incident will be reported.

原因就是当前的用户没有加入到sudo的配置文件里

解决方法:

  1. #切换到root用户

  2. su

  3. #编辑配置文件

  4. vim /etc/sudoers

  5. #找到root ALL=(ALL) ALL, 在下面添加一行, xxx是用户名称

  6. xxx ALL=(ALL) ALL

使用root用户执行以下命令,再ping

chmod u+s /bin/ping

22020309128 信安一班 hhw

 

 

 

 

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/834720
推荐阅读
相关标签
  

闽ICP备14008679号