【发布时间】:2015-02-10 06:01:26
【问题描述】:
我正在关注Hadoop official tutorial 在我的机器上以伪分布式模式运行 Hadoop。
我可以使用 ssh 登录 localhost,无需密码:
admin@mycomputer:/usr/local/hadoop/hadoop-2.6.0$ ssh localhost
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-45-generic x86_64)
* Documentation: https://help.ubuntu.com/
4 packages can be updated.
0 updates are security updates.
Last login: Mon Feb 9 12:31:17 2015 from localhost
admin@mycomputer:~$
我也可以无误地格式化namenode,但是我不能用start-dfs.sh启动Hadoop:
admin@mycomputer:/usr/local/hadoop/hadoop-2.6.0$ sudo sbin/start-dfs.sh
Starting namenodes on [localhost]
root@localhost's password:
localhost: Permission denied, please try again.
为什么仍然要求我提供 root 密码,而我可以在没有它的情况下通过 ssh 进入 localhost?
我也试过了:
sudo passwd
重置密码,但后来遇到同样的权限被拒绝错误,在我看来这个密码不是root@localhost的密码。我该如何解决这个问题?
【问题讨论】: