关于centos 7.x的后台密码(root)忘记的解决办法:
断电重启并重复点按上下键进入系统引导页;
选中第一行的centos 7.x系统并按E键或ESC键进入编辑页面;
找到linux16开头、UTF-8结尾的那一段,在段末尾处留出一个空格并键入rd.break;
按Ctrl+X,进入单用户模式;
switch_root:/# 后键入mount -o remount,rw /sysroot 回车;
switch_root:/# 后键入chroot sysroot 回车;
sh-4.2# 后键入unset LANG 回车;
sh-4.2# 后键入passwd (账户名、如root) 回车;
sh-4.2# 后键入touch /.autorelabel 回车;
键入new password 回车;
键入retype password 回车;
键入exit 回车;
键入exit 回车;
重启设备。