filmov
tv
Reset Forgotten Root User Password in Redhat Enterprise Linux 8 (RHEL 8)

Показать описание
As humans, we tend to forget things especially if all is stored in our minds. Is it possible to reset a forgotten root password on RHEL 8?. If this is your question, then the answer is YES. It is easy to reset your root password if you have an active user account with sudo privileges. All you need to do is run:
# sudo passwd root
This will ask you for the new root password and confirmation. But what if you don’t have access to a local user with sudo privileges and can’t recover root password via other means. This leaves you with the manual password recovery on your RHEL 8 server from the Grub boot menu.
Step to follow:
1. Boot / reboot RHEL 8 server.
The first step is bringing up RHEL 8 system in the stopped state or rebooting a running RHEL 8 system.
2. Interrupt Boot process and reset root password on RHEL 8.
Once you see the grub menu, press the “e” key in your keyboard to interrupt the boot process.
3. Press 'e' as shown in the video.
This will show you the Kernel boot parameters. We will modify these options so as to reset the root password on RHEL 8.
4. Remove ro crash from the line.
5. When done, press "Ctrl-x" to start system.
This will take you to a shell where you have to remount root of the system with rw flag since it is in read only mode.
6. Mount system in read write mode.
# mount -o remount,rw /sysroot
7. Switch to /sysroot directory and reset root password.
#chroot /sysroot
8. Reset root password on RHEL 8 using the passwd command.
#passwd
9. Enter desired password and confirm when prompted.
10. Once password is set, enable SELinux relabeling on reboot and exit the console.
# touch /.autorelabel
# exit
# exit
The system will resume normal reboot and check SELinux policy against all system files and directories.
You’ll then see login screen similar to below. Login with root username and password provided during reset.
And boom!. You have successfully performed password reset of root user on RHEL 8. Well done.
Thanks for watching, keep liking and sharing our videos.
==============================================
Swap File:
LVM:
Android:
# sudo passwd root
This will ask you for the new root password and confirmation. But what if you don’t have access to a local user with sudo privileges and can’t recover root password via other means. This leaves you with the manual password recovery on your RHEL 8 server from the Grub boot menu.
Step to follow:
1. Boot / reboot RHEL 8 server.
The first step is bringing up RHEL 8 system in the stopped state or rebooting a running RHEL 8 system.
2. Interrupt Boot process and reset root password on RHEL 8.
Once you see the grub menu, press the “e” key in your keyboard to interrupt the boot process.
3. Press 'e' as shown in the video.
This will show you the Kernel boot parameters. We will modify these options so as to reset the root password on RHEL 8.
4. Remove ro crash from the line.
5. When done, press "Ctrl-x" to start system.
This will take you to a shell where you have to remount root of the system with rw flag since it is in read only mode.
6. Mount system in read write mode.
# mount -o remount,rw /sysroot
7. Switch to /sysroot directory and reset root password.
#chroot /sysroot
8. Reset root password on RHEL 8 using the passwd command.
#passwd
9. Enter desired password and confirm when prompted.
10. Once password is set, enable SELinux relabeling on reboot and exit the console.
# touch /.autorelabel
# exit
# exit
The system will resume normal reboot and check SELinux policy against all system files and directories.
You’ll then see login screen similar to below. Login with root username and password provided during reset.
And boom!. You have successfully performed password reset of root user on RHEL 8. Well done.
Thanks for watching, keep liking and sharing our videos.
==============================================
Swap File:
LVM:
Android:
Комментарии