Reset Root Password CentOS 7

Scenario: Reset root password CentOS/RHEL 7
System: CentOS/RHEl 7

Steps:
1) On first boot menu select first kernel(on top) then Press ‘e’

2) Change ro with rw init=/sysroot/bin/sh

3) On single user mode,follow command in picture below.
# chroot /sysroot
# passwd root
# touch /.autorelabel
# exit
# reboot

4) After reboot you can login to root using new password.

Reference:
https://acenk90.wordpress.com/2015/10/27/cara-reset-password-root-linux-centos-7-melalui-single-user-mode/

Leave a Reply

Your email address will not be published. Required fields are marked *