修改/etc/sudoers配置文件,添加一行 [root@VM ~]# vi /etc/sudoers ## Allow root to run any commands anywhere root ALL=(ALL) ALL hadoop ALL=(ALL) NOPASSWD: ALL 修改完关闭文件,即时生效。