• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

centos linux忘记密码进行重置


wings

Recommended Posts

一.重启系统,进入 recovery 恢复模式
在读秒时候按e键,找到 linux16 行,按键盘End

末尾添加空格 rd.break console=tty0

按 ctrl + x 启动

二.以可写方式重新挂载 /sysroot,并切换到此环境
1 switch_root# mount  -o  remount,rw  /sysroot

2 switch_root# chroot  /sysroot

3 sh-3.2#

三. 将root用户的密码设置为 redhat
# echo  redhat  |  passwd  --stdin  root

)重设SELinux安全标签(安全增强版Linux)

# touch  /.autorelabel            //让  SElinux  失忆

# exit
switch_root# reboot 完成修复
————————————————
版权声明:本文为CSDN博主「ghostwritten」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xixihahalelehehe/article/details/105746227

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now