首先进入root用户
su
输入密码
进入etc目录
cd /etc/
chmod u+w /etc/sudoers
打开sudoers编辑内容
vim /etc/sudoers
加入如下内容
hadoop ALL=(root) NOPASSWD:ALL
在修改sudoers权限
chmod u-w /etc/sudoerss
exit退出root用户,在hadoop用户下查看防火墙状态
service firefalld status
首先进入root用户
su
进入etc目录
cd /etc/
chmod u+w /etc/sudoers
vim /etc/sudoers
hadoop ALL=(root) NOPASSWD:ALL
在修改sudoers权限
chmod u-w /etc/sudoerss
service firefalld status