修改root密码

linux的密码修改

1、重启
2、在启动选择系统内核界面,按 e 键进入单用户模式
3、找到 linux16 开头行,删除 ro , 并且在 ro 处添加 rw init=/sysroot/bin/sh
4、按 ctrl + x 进行系统重新引导
5、执行 chroot /sysroot
6、执行 passwd root
7、执行 touch /.autorelabel
8、执行 Ctrl + D
9、执行 reboot

https://www.cnblogs.com/ouyangzhen/p/16096341.html
https://blog.csdn.net/songhaixing2/article/details/109780512

http://c.biancheng.net/view/1041.html

posted @ 2022-08-24 15:59  干扰项  阅读(276)  评论(0)    收藏  举报