第一种方法:rd.break进入救援模式重置密码
(1)开机启动时出现下面这个界面时要按一下上下键,因为有时间限制


rd.break
(2)再按Ctrl+x键进入下面这个界面,使用mount查看权限

(3)修改权限
mount -o remount,rw /sysroot


(4)修改到根目录

(5)修改中英文(如果原本是英文环境的话可以不用这步骤)

(6)下面这条命令是重中之重
touch /.autorelabel


(6)这样就可以使用你的密码登录成功了

第二种方法:利用光盘重置密码
(1)确保虚拟机有挂载光盘
虚拟机->设置->CD


(2)单击这个右键->电源->打开电源时进入固件

(3)按F10进行保存退出








(4)接着按两次exit即可退出
(5)接着这两个位置调回来即可

(6)最后即可使用新设的密码进行登陆

网友评论