redhat之root密码破解
一、Redhat6(1)重启,在读秒时按任意键
(2)按e进入grub的编辑模式
(3)将光标移到kernel那一行,再按e进入kernel编辑界面
(4)在出现的界面中的最后方(即quiet后)输入single或者1
(5)按enter键后,在按b,进入单用户模式
(6)用passwd 命令修改root密码,然后重启
二、Redhat7
开机在读秒时按任意键,选择kernel行按e,在linux16行删除ro后的内容,然后在ro后写上rd.break(或者不进行删除直接在linux16行末写上rd.break),接着操作如下:
(1)ctrl + x
(2)mount -o remount,rw /sysroot->chroot /sysroot
(3)passwd->touch /.autorelabel
(4)exit
(5)exit
注1:若有报错关于selinux的,要在第(4)步前执行如下操作:
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config/
注2:将/etc/fstab中的网络挂载盘注释掉
页:
[1]