Centos 7 密码重置
Centos 7 密码重置
步骤如下
1、在启动 grub 菜单,选择编辑选项启动
1
2、按键盘 e 键,来进入编辑界面
2
3、找到 Linux 16 的那一行,将 ro 改为 rw init=/sysroot/bin/sh
3
4、现在按下 Control+x ,使用单用户模式启动
4
5、现在,可以使用下面的命令访问系统 chroot /sysroot
6、重置密码 passwd root
7、更新系统信息 touch /.autorelabel
8、退出 chroot exit
9、重启你的系统 reboot
摘录
原文地址:https://www.cnblogs.com/fina/p/10818157.html