zoukankan      html  css  js  c++  java
  • RHEL7 recover/reset root password

    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
  • 相关阅读:
    冲刺一(5)
    冲刺一(4)
    冲刺一(3)
    构建之法阅读笔记之二
    冲刺一(2)
    冲刺一(1)
    第9周总结
    热词顶会分析
    第8周总结
    构建之法阅读笔记之一
  • 原文地址:https://www.cnblogs.com/wgwyanfs/p/6899934.html
Copyright © 2011-2022 走看看