【QA4】【sudoers问题解决】(*** is not in the sudoers file.This incident will be reported)

问题现象:sudo make /etc/local/hao 的时候出现 hao is not in the sudoers file.  This incident will be reported. 错误

问题原因:linux默认没有开启sudo权限。

解决方法:

#su 切换至root

#chmod u+w /etc/sudoers

#vi /etc/sudoers

在 admin ALL=(ALL) ALLZ下,添加hao ALL=(ALL) ALL

然后保存退出

再尝试 sudo make /etc/local/hao,发现还是报错:

sudo: /etc/sudoers is mode 0640, should be 0440
sudo: no valid sudoers sources found, quitting

这时候要修改还原权限,切换root,去掉/sudoers的 写权限

#chmod u-w /etc/sudoers

posted @ 2012-05-02 12:51  念槐聚  阅读(426)  评论(0编辑  收藏  举报