From 5e2473ffa55a152d95bb37be43ffedb19dd78e70 Mon Sep 17 00:00:00 2001 From: Hugh Ratsch Date: Thu, 20 Feb 2025 12:44:08 -0600 Subject: [PATCH] updated notes --- src/rhcsa.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/rhcsa.md b/src/rhcsa.md index f899b9e..2014c4e 100644 --- a/src/rhcsa.md +++ b/src/rhcsa.md @@ -912,4 +912,34 @@ dig google.com # Query the DNS server for google.com sudo vim /etc/resolv.conf # Edit the resolv.conf file ### change the nameserver to 8.8.8.8 nameserver 8.8.8.8 +``` + +### Recovering the Root Password +```bash +### reboot the system +sudo reboot + +### press esc to get to the grub menu +### press e to edit the grub menu + +### go to the line that starts with linux16 +### scroll down to the end of the line + +### delete rhgb quiet + +### add the init=/bin/bash to the end of the line +... init=/bin/bash + +### press ctrl+x to boot into single user mode +### mount the root filesystem +mount -o remount,rw / + +### change the root password +passwd root + +### inform selinux to allow the root password change +touch /.autorelabel +exec /usr/lib/systemd/systemd + +### the system may take a while to boot ``` \ No newline at end of file