写在前面:无论怎么确认,还是泪奔了,同一个账号以前的东西消失了,虽然不多,如同丢失了心爱的东西。
步骤:
1. 创建名为hadoop用户组
sudo addgroup hadoop
2. 创建名为hadoop的用户
sudo adduser --ingroup hadoop hadoop
直接一路回车
3. sudo gedit /etc/sudoers
为了让hadoop使用sudo命令,修改该文件,在root ALL=(ALL:ALL) ALL下面添加一行:
hadoop ALL=(ALL:ALL) ALL
原文件备份:
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
#