码迷,mamicode.com
首页 > 其他好文 > 详细

RHEL7 recover reset root password

时间:2014-10-01 01:04:40      阅读:369      评论:0      收藏:0      [点我收藏+]

标签:rhel   password   rhel7   密码   


If you have lost or forgot root password of RHEL7, you can follow this step to change to a new password, this is different with the RHEL6  single-usermode,

1, press e button in GRUB 2 boot screen.

2, at the end of Linux line add init=/bin/sh and remove ‘rhgb‘ and ‘quiet‘

3, Ctrl+x to boot the system with the parameter

4, remount the file system as writable, run the mount -o remount, rw / command

5, passwd to change password.

6, make sure SELinux context of the files that were modified is restored, touch /.autorelabel

7, last step, resume the initialization and finish the system boot. exec /sbin/init


Redhat official link to this: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-Terminal_Menu_Editing_During_Boot.html#sec-Booting_to_Rescue_Mode


本文出自 “消消” 博客,请务必保留此出处http://zhangxiaohua.blog.51cto.com/2321741/1559705

RHEL7 recover reset root password

标签:rhel   password   rhel7   密码   

原文地址:http://zhangxiaohua.blog.51cto.com/2321741/1559705

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!