VMware CentOS7 忘记root密码如何更改

36 篇文章 8 订阅
34 篇文章 5 订阅

VMware CentOS7 忘记root密码如何更改

1、进来的页面马上点上下键停止自动进入

(Immediately click the up and down buttons on the incoming page to stop automatic entry)

在这里插入图片描述

2、点键盘e键进入编辑页面e

(Click the keyboard e key to enter the editing page)

e

3、找到这个linux16 /vmlinuz…这行代码,在最后UTF-8的后面输入代码

(Find this linux16/vmlinuz … This line of code, enter the code after UTF-8 at the end)
在这里插入图片描述

rw init=/bin/bash

在这里插入图片描述

4、按住 ctrl+x 进入bash终端

(Press ctrl+x to enter the bash terminal)

ctrl+x

5、bash命令行改密码

(Insert code)

passwd root

在New password后面输入密码,不用管密码长度提示,直接下一步确认密码
.
Enter the password after New password, regardless of the password length prompt, and proceed to the next step to confirm the password

在这里插入图片描述

5、输入命令

(Insert code)

touch /.autorelabel

在这里插入图片描述

6、输入命令退出编辑

(Insert code quit edit mode)

exec /sbin/init

在这里插入图片描述

密码更改完毕!Success!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Agatha方艺璇

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值