首页 > 其他 > 详细

centos7 重置root 密码

时间:2017-05-26 15:43:51      阅读:307      评论:0      收藏:0      [点我收藏+]

技术分享

1 - 在启动grub菜单,选择编辑选项启动

技术分享

2 - 按键盘e键,来进入编辑界面

技术分享

3 - 找到Linux 16的那一行,将ro改为rw init=/sysroot/bin/sh

技术分享

4 - 现在按下 Control+x ,使用单用户模式启动

技术分享

5 - 现在,可以使用下面的命令访问系统

  1. chroot /sysroot

6 - 重置密码

  1. passwd root

7 - 更新系统信息

  1. touch /.autorelabel

8 - 退出chroot

  1. exit

9 - 重启你的系统

  1. reboot

就是这样!

编译自:http://www.unixmen.com/reset-root-password-centos-7/作者: M.el Khamlichi
原创:LCTT https://linux.cn/article-3962-1.html译者: su-kaiyao
本文地址:https://linux.cn/article-3962-1.html

centos7 重置root 密码

原文:http://www.cnblogs.com/chrdai/p/6908613.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!