1.在启动的过程中,按e
在linux16 最后面输入:rd.break ,按ctrl+x执行
输入:
sh-4.2# mount -o remount,rw sysroot #回车
sh-4.2# chroot sysroot #回车
sh-4.2# echo "新密码" | passwd --stdin root #回车,有回显
sh-4.2# touch /.autorelabel #回车
sh-4.2# exit #回车
switch_root:/# exit #回车
稍等片刻即可。
登录时密码使用修改后的密码。