Monday 13 August 2018

RESET ROOT PASSWORD ON CENTOS 6/7 (ACCESS SINGLE USER MODE )


To reset the root password of your server, you will need to boot into single user mode

CENTOS 6 

  1. Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.
  2. You will see a GRUB boot prompt telling you to press any key - you have only a few seconds to press a key to stop the automated booting process. (If you miss this prompt you will need to restart the VM again)
  3. At the GRUB prompt, type "a" to append to the boot command.
  4. Add the text "single" and press enter.
  5. System will boot and you will see the root prompt. Type "passwd" to change the root-password and then reboot again.
CENTOS 7 

  1. Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.
  2. As soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to turn the system off from the control panel and then back on to reach the GRUB boot prompt.
  3. You will see a GRUB boot prompt - press "e" to edit the first boot option. (If you do not see the GRUB prompt, you may need to press any key to bring it up before the machine boots)
     4. Find the kernel line (starts with "linux16"), change ro to rw init=/sysroot/bin/sh.

    

     5. Press CTRL-X or F10 to boot single user mode. 
    6. Access the system with the command: chroot /sysroot
     

    7. Run passwd command  to change the root password.
    8. Reboot the system: reboot –f 
    9. root password change ..Now  Enjoy 

1 comment:

  1. Procure microsoft office 2019 home & business, Step up with the new range of Microsoft Office, containing the 2019 versions of your favorite productivity software. Upgraded Word, Excel, PowerPoint and OneNote come with enhanced new time-saving features and a sleek, modern look.

    ReplyDelete

Create a New Virtual Machine

1.In the left pane, Click on the Hyper-V manager that you wish to host the new virtual machine. 2. In the right-hand Action pane, Click Ne...