Page 1 of 1

I forget my root login password of RHEL 7

PostPosted: Mon Feb 23, 2015 11:41 am
by rameez
Hi,

I know how to recover root password of RHEL-6 version, but in the same way I couldn't reset the password of RHEL-7 in Single Usermode. Kindly help me to reset the password. :cry: :cry: :cry: :cry:

Re: I forget my root login password of RHEL 7

PostPosted: Mon Feb 23, 2015 11:50 am
by rameez
While google, I got a perfect answer.

1.Login to single user mode.
2.init=/bin/sh at the end of line that starts with linux in Grub2 (In case of VMWare like KVM or VirtualBox use rb.break instead of inti=/bin/sh)
3.run mount -o remount,rw /sysroot when the system boots
4.run chroot /sysroot
5.run passwd
6.run touch /.autorelabel
7.run exit to leave chroot
8.run exit to logout

Re: I forget my root login password of RHEL 7

PostPosted: Mon Mar 02, 2015 10:45 pm
by m4tomson
You can break your booting and perform the following :

1. edit at the end of your kernel line as rd.break
2. #mount -o remount,rw /sysroot
3.#chroot /sysroot
4.change your root password using passwd command
5.#touch /.autorelabel
6.#exit -to exit from chroot
7.#exit -to logout and reboot.