@tsing1226
2016-09-14T19:41:47.000000Z
字数 417
阅读 1410
linux
sed -i '$a username ALL=(root) ALL NOPASSWD : ALL' /etc/sudoers
注意:在/etc/sudoers文本的最后中添加如上内容grc
例如:sed -i '$a hadoop ALL=(root) ALL NOPASSWD : ALL' /etc/sudoers
/etc/sudoers最后一行
hadoop ALL=(root) ALL NOPASSWD : ALL
#
Last login: Wed Sep 14 04:31:43 2016 from 192.168.2.10
Could not chdir to home directory /home/hadoop: Permission denied
-bash: /home/hadoop/.bash_profile: Permission denied
该用户没有访问权限
chown -R hadoop:hadoop /home/hadoop/