How to reset root password in Centos /Redhat 7 by techsword

Опубликовано: 16 Август 2020
на канале: Tech Sword
16
3

Forgot your RHEL 7 or CentOS 7 Linux root password? Did you recently inherit one of these systems but do not have a way to log in? If you have access to the console, be it physical or using whatever Hyper-Visor tools, you may be able to perform a root password recovery procedure.

Look for a line that mentions linux16 (or linuxefi if you are using UEFI bios). You may need to use the arrow keys to scroll down. At the end of the linux16 or linuxefi line, find and replace the rhgb quiet parameters with rd.break enforcing=0

Enter the following command to remount the sysroot filesystem as read/write: mount -o remount,rw /sysroot


Now we chroot into the sysroot, using the following command: chroot /sysroot

We can use the passwd command to change the root password.


Issue the following command to bring us back to the switch_root:/# prompt: exit

Now we can exit the session and allow the system to reboot using the following command: exit

Allow the system to boot normally and login as root using the new password that you set in step 6.


Смотрите видео How to reset root password in Centos /Redhat 7 by techsword онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Tech Sword 16 Август 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1 раз и оно понравилось людям.