普通用户具有sudo执行权限

切换到root用户

vi  /etc/sudoers 加入一行

hadoop(此为用户名hadoop)  ALL=(ALL)  ALL如下图

原文地址:https://www.cnblogs.com/lovetl/p/12016189.html