一叶知秋.

业精于勤,荒于嬉;行成于思,毁于随。

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

环境:centos6.0 64位
问题:

#普通用户test使用sudo yum命令安装软件时报错
[test@lfs ~]$ sudo yum -y install patch
[sudo] password for test: 
test is not in the sudoers file.  This incident will be reported.
#test不在sudoers(/etc/sudoers)文件中,这个事件将会被报告(以邮件的方式发送给root用户,"/var/spool/mail/root"文件中)。

原因:test用户没有被授予yum安装软件的权限

解决办法:root用户使用visudo命令编辑配置文件

#visudo
#找到root ALL=(ALL)  ALL,添加一行:
test    ALL=(ALL)       /usr/bin/yum
posted @ 2020-08-24 17:56  ccku  阅读(876)  评论(0编辑  收藏  举报