I forget my root login password of RHEL 7
Posted:
Mon Feb 23, 2015 11:41 am
by rameez
Re: I forget my root login password of RHEL 7
Posted:
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
Posted:
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.