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

来源:互联网 发布:淘宝买iphone7靠谱商家 编辑:程序博客网 时间:2024/06/15 12:45

问题现象

[rems@linux6 ~]$ sudo pip install ansibleWe trust you have received the usual lecture from the local SystemAdministrator. It usually boils down to these three things:    #1) Respect the privacy of others.    #2) Think before you type.    #3) With great power comes great responsibility.[sudo] password for rems:rems is not in the sudoers file.  This incident will be reported.

问题解决

原因在与该用户没有添加到visudo配置文件中

编辑visudo

[root@linux6 yum.repos.d]# visudo## Allow root to run any commands anywhereroot    ALL=(ALL)       ALLrems ALL=(ALL)       ALL   ---> 新添加内容

再次执行sudo命令,OK

阅读全文
0 0
原创粉丝点击