CentOS7忘记登陆密码怎么修改

#进入启动系统界面 

#进入界面时有提示e,立即按e ,就显示如下:

#在界面找到ro这一项,改为rw init=/bin/sh,把rhgb quiet删除

 

 #再按Ctrl +x,就显示如下:

#修改root密码

# echo  123|passwd --stdin root   #设置root密码

#防止Selinux重启后更新

# touch /.autorelabel

 

#进入登录系统界面

# exec /sbin/init 

 #成功修改密码

扫描二维码关注公众号,回复: 12472728 查看本文章

猜你喜欢

转载自blog.csdn.net/qq_41709494/article/details/89074141
今日推荐