root@localhost 的密码是什么? [英] What is the password for root@localhost's password?

查看:109
本文介绍了root@localhost 的密码是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 windows ubuntu 子系统上配置 hadoop 2.7.3.我使用 root 作为 root 帐户密码,但是当我尝试运行/bin/start-yarn.sh 时,我被要求输入 root@localhost

I'm configuring the hadoop 2.7.3 on windows ubuntu subsystem. I used root as the root account password, but when I try to run /bin/start-yarn.sh, I was required to input the password for root@localhost

lizhi@localhost's password:

我为此尝试过 root,但从未奏效.

I have tried root for this, but never worked.

我也试过

ssh-genkey 
cat /home/user/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys

但是调用./start-yarn.sh还是需要密码,这个密码是多少,为什么和root账户密码不一样?

But it still required a password when calling ./start-yarn.sh, what is the password for this, why is it different with root account password?

我尝试使用 passwd 将密码更改为 root,但仍然被拒绝:

I've tried to change password to root using passwd, and I still get denied:

C:\Users\lizhi>bash
lizhi@LAPTOP-SURFACEP:/mnt/c/Users/lizhi$ sudo su
[sudo] password for lizhi:
root@LAPTOP-SURFACEP:/mnt/c/Users/lizhi# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@LAPTOP-SURFACEP:/mnt/c/Users/lizhi# ssh localhost
root@localhost's password:
Permission denied, please try again.
root@localhost's password:
Permission denied, please try again.
root@localhost's password:
Received disconnect from 127.0.0.1: 14:
root@LAPTOP-SURFACEP:/mnt/c/Users/lizhi#

欢迎提出任何建议.

推荐答案

除非你设置它,否则它是空白的(如"):

It is blank (as in "") unless you set it:

ssh root@localhost 对 root 使用相同的密码.看起来您还没有设置root密码.为此,请使用 sudo -s 以 root 身份登录,然后使用 passwd 命令设置 root 密码.

ssh root@localhost uses the same password for root. It looks like you have not set root password. To do that log in as root using sudo -s then use passwd command to set root password.

之后你必须能够以 root 身份 ssh

After that you must be able to ssh as root

这篇关于root@localhost 的密码是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆