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.
I forget my root login password of RHEL 7
3 posts
• Page 1 of 1
Re: I forget my root login password of RHEL 7
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
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
- rameez
- Posts: 0
- Joined: Tue Nov 25, 2014 5:17 pm
Re: I forget my root login password of RHEL 7
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.
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.
- m4tomson
- Posts: 0
- Joined: Tue Oct 28, 2014 5:15 pm
3 posts
• Page 1 of 1