搬瓦工root密码修改密码失败的解决方法

搬瓦工

我们都知道可以通过搬瓦工的 KiwiVM 后台进行重置密码。相关方法可以参考:搬瓦工修改或者重置 root 密码教程

但是有些时候 KiwiVM 后台会出现问题,导致重置密码失败。具体体现为,即使你在后台关闭了 VPS,stop 或者 kill 了,且 VPS 的状态已经显示为 stopped 了,但是点击重置密码的时候还是提示你 VPS 还在运行。

出现这个问题的原因暂时也不清楚。我也咨询过客服,客服的答复如下:

If you do not have root credentials, please use KiwiVM panel to obtain them.

There are the following options:

1. Root password reset. This will generate a new temporary root password and display it on the screen. This may not always work, depending on your Operating system or server configuration (you will see Error 3009005).

2. Interactive console. This allows you to establish a KVM session with your VPS. This way you can reboot your VPS into single user mode, then change root password from there via regular ‘passwd’ command.
Use online search to find out how to boot into single user mode. Try the following queries:
centos 7 single mode root password reset
debian 8 single mode root password reset
(substitute OS with the correct OS version you’re using)

3. OS reinstall. This will reinstall the operating system and will generate & display a new root password. This is the easiest method, though all data on the VPS will be lost.

废话挺多,甚至让我重装系统,但是能通过其他方式解决的问题,没必要每次都重装系统。下面就来介绍一下怎么进行重置密码。

通过命令行重置密码

登录到 KiwiVM 后台之后,首先把 VPS 开启,确保 VPS 是 running 状态。

然后点击左侧菜单的 Root shell – basic,然后输入如下命令:

echo "root:mypassword" | chpasswd

其中,root 是用户名,不要修改。mypassword 就是你要设置的密码,请改成你自己想设置的密码。

输入完之后回车,不会有任何提示,但是已经修改成功了。

是的,就是这么简单,至此,你已经完成了密码修改。

之后就可以通过 SSH 登录搬瓦工的 VPS 进行各种操作了(如何通过SSH登录搬瓦工VPS)。

其他

推荐购买以下几款方案:

CN2 GIA 特价促销款 40 GB
  • CPU:3 核
  • 内存:2048 MB
  • 硬盘:40 GB SSD
  • 流量:2000 GB / 月
  • 带宽:1 Gbps
  • 机房:CN2 GIA 机房
  • 迁移:可迁移至其他机房,流量不变
  • 价格:39.99 美元 / 季度,139.99 美元 / 年
CN2 GIA 特价促销款 80 GB
  • CPU:4 核
  • 内存:4096 MB
  • 硬盘:80 GB SSD
  • 流量:3000 GB / 月
  • 带宽:1 Gbps
  • 机房:CN2 GIA 机房
  • 迁移:可迁移至其他机房,流量不变
  • 价格:27.99 美元 / 月,279.99 美元 / 年
KVM 常规版 10 GB
  • CPU:1 核
  • 内存:512 MB
  • 硬盘:10 GB SSD
  • 流量:500 GB
  • 带宽:1 Gbps
  • 机房:KVM 8 个机房
  • 迁移:可迁移,到 CN2 后流量为 1/3
  • 价格:19.99 美元/年
KVM 常规版 20 GB
  • CPU:2 核
  • 内存:1024 MB
  • 硬盘:20 GB SSD
  • 流量:1000 GB
  • 带宽:1 Gbps
  • 机房:KVM 8 个机房
  • 迁移:可迁移,到 CN2 后流量为 1/3
  • 价格:25.99 美元/半年,49.99 美元/年
CN2 特价促销款 10 GB
  • CPU:1 核
  • 内存:512 MB
  • 硬盘:10 GB SSD
  • 流量:500 GB
  • 带宽:1 Gbps
  • 机房:KVM 8 个机房
  • 迁移:可迁移机房,流量不变
  • 价格:29.99 美元/年
CN2 特价促销款 20 GB
  • CPU:1 核
  • 内存:1024 MB
  • 硬盘:20 GB SSD
  • 流量:1000 GB / 月
  • 带宽:1 Gbps
  • 机房:KVM 8 个机房
  • 迁移:可迁移机房,流量不变
  • 价格:29.99 美元/半年,49.99 美元/年

未经允许不得转载:搬瓦工 » 搬瓦工root密码修改密码失败的解决方法