0
点赞
收藏
分享

微信扫一扫

How To Reset Root Password On CentOS 7

  1. 重启CentOS,在GRUB Boot 菜单,按e编辑启动菜单:

How To Reset Root Password On CentOS 7_单用户模式

2.将光标移动到 Linux16 所在行,将 ro 更改为 “rw init=/sysroot/bin/sh”:

How To Reset Root Password On CentOS 7_单用户模式_02

改为:

How To Reset Root Password On CentOS 7_单用户模式_03

按下Ctr+x 启动到单用户模式(single user mode)下:

How To Reset Root Password On CentOS 7_单用户模式_04

3.在单用户模式下运行如下命令:

chroot /sysroot

passwd root

touch /.autorelabel

exit

reboot

How To Reset Root Password On CentOS 7_centos_05


举报

相关推荐

Centos7 Linux重置root密码

0 条评论