您的位置:首页 > 运维架构

普通用户执行sudo报hadoop is not in the sudoers file

2016-03-21 17:45 411 查看
今天在用普通用户执行sudo命令时报错如下:

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

实测解决方式如下:

1,root用户登录。

2,进入到/etc目录。

3,执行chmod u+w /etc/sudoers给sudoers文件增加write权限。

4,执行vim sudoers 找到root ALL=(ALL) ALL这一行,一下面增加hadoopALL=(ALL) ALL(注:hadoop为普通用户的用户名)

5,执行命令chmod u-w sudoers,撤销write权限。,

6,登录hadoop用户,进行测试。比如sudo cd /root 如果成功进入 /root目录说明配置成功
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: