Тёмный

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

Nehra Classes
Подписаться 47 тыс.
Просмотров 28 тыс.
50% 1

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.
Under the linux line, Press "ctrl+e" to go to the end of line and delete “ro crash“, then add “rd.break enforcing=0”
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.
Source: computingforgeeks.com/how-to-...
Thanks for watching, keep liking and sharing our videos.
==============================================
Swap File:
• Create Swap File in Re...
LVM:
• Logical Volume Managem...
Android:
• Instantly Unlock Mi An...

Опубликовано:

 

2 янв 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@harispalegar2673
@harispalegar2673 3 года назад
Nice information. Most asked question in interview
@decoder6878
@decoder6878 3 года назад
The whole series is very helpful. Thank you sir
@NehraClasses
@NehraClasses 3 года назад
You're welcome
@user-pw3gi3ou6f
@user-pw3gi3ou6f 9 месяцев назад
Very helpful video, thank you and wish you to publish such narrow videos
@chetanghadge3075
@chetanghadge3075 Год назад
thanks sir.... god bless you.... keep it up....
@stoic300
@stoic300 2 года назад
Thank you !
@ponnuponnu731
@ponnuponnu731 9 месяцев назад
how to do this in aws sir ?
@jay-yl2lm
@jay-yl2lm Год назад
Thank you works for 9 also
@bog9867
@bog9867 Год назад
Thank you very much, you've rescued me.
@usefulworld4427
@usefulworld4427 2 года назад
Helpful 👌👍
@nishitkawane
@nishitkawane Год назад
Hello Sir I tried to same step you mention in vedio but somehow trying to press Ctrl+x but not able go in switch_root: /#. I am using Red Hat Enterprise Server 6.4
@chetanghadge3075
@chetanghadge3075 Год назад
In RHEL 6.4 you can use single user mode to reset root password.
@deepeshdevagirikar5595
@deepeshdevagirikar5595 2 года назад
Nice sir,
@aadarshGupta7777
@aadarshGupta7777 Год назад
thanks sir
@ramesh75
@ramesh75 Год назад
Very helpful stuff
@NehraClasses
@NehraClasses Год назад
Glad it was helpful!
@nikhildhakad4773
@nikhildhakad4773 3 года назад
Ctrl+x ke baad cli mod me nahi jaa raha hai ?????
@NehraClasses
@NehraClasses 3 года назад
You might be making some mistake
@RAJESH111090
@RAJESH111090 2 года назад
Sir I forgot user name and password of RHEL 5 PKEASE HELP ME
@NehraClasses
@NehraClasses 2 года назад
Please post your queries in telegram group, rhel 5 is outdated
@dipakmahajan2623
@dipakmahajan2623 Год назад
Sir user password change kesekr sakte hai
@NehraClasses
@NehraClasses Год назад
Simply run passwd command for the user
@ankurgupta316
@ankurgupta316 2 года назад
Ye to root password ha. User password kese kese reset kare ?
@NehraClasses
@NehraClasses 2 года назад
Simply execute passwd username from root account
@MkOFFERS2.0
@MkOFFERS2.0 4 года назад
Nice
@NehraClasses
@NehraClasses 4 года назад
Thanks 🙏
@MadhuSingh-xz7pw
@MadhuSingh-xz7pw Год назад
Chrootka use kyo karte hai
@NehraClasses
@NehraClasses Год назад
Chroot creates an environment to make changes in the operating system files.
@MadhuSingh-xz7pw
@MadhuSingh-xz7pw Год назад
Sir Christian ka use kyo karte hai
@NehraClasses
@NehraClasses Год назад
Please watch my chroot session video
Далее
would you eat this? #shorts
00:23
Просмотров 2 млн
Configure FTP Server in RHEL 7/8
10:49
Просмотров 9 тыс.
How to Reset Forgotten Ubuntu Password
3:57
Просмотров 27 тыс.