7.实验:CentOS7破解root口令
目的
破解CentOS7:root口令
前提
可用的centos7系统
启动项e键修改
方法1:
找到lunux16这一行、行尾添加rd.break,ctrl+x启动
mount -o rw,remount /sysroot #重新挂载挂载文件系统(以读写权限挂载)
chroot /sysroot #切根
passwd #修改密码
touch /.autorelabel #如果selinux启动状态,则需要
exit
reboot
方法2:
找到linux16,行尾添加 rw init=/sysroot/bin/sh ,ctrl+x启动
chroot /sysroot #切根
passwd #修改密码
touch /.autorelabel #如果selinux启动状态,则需要
exit
reboot