系统相关
首页 > 系统相关> > Centos7单用户模式修改密码

Centos7单用户模式修改密码

作者:互联网

Centos7单用户模式修改密码

1.重启Liinux,在启动界面,按 ‘e’

image.png

2.在 'rhgb' 前添加 'rw' ,在行末添加 'init=/bin/sh' ,按 'Ctrl+x' 进入系统

image.png

3.修改密码

 passwd root
 ​
 touch /.autorelabel
 exec /sbin/init

  

4.等待一会后,点击回车进入重启

 

标签:密码,修改,重启,Centos7,单用户,init
来源: https://www.cnblogs.com/ygk945/p/15131526.html