Chapter 3 Operate Running Systems
Chapter 3 Operate Running Systems
Systems
Liban Bashir
Network Security Administrator/
Former SYSTEM ADMIN
RHCSA / RHCE & RED HAT
VIRTUALIZATION
[email protected]
Chapter 4- agenda
◦ Boot, reboot, and shut down a system normally
◦ Boot systems into different targets manually
◦ Interrupt the boot process in order to gain access
to a system
◦ Identify CPU/memory intensive processes and kill
processes
◦ Locate and interpret system log files and journals
◦ Preserve system journals
◦ Start, stop, and check the status of network
services
SHUTTING DOWN, SUSPENDING,
AND HIBERNATING THE SYSTEM
Select the kernel you want to boot into, and hit 'e': This will
take you into a screen where you can edit the grub bootloader
script.
Find the line that refers to the kernel: There will be a series of
'boot parameters' here: these are instructions passed during
the loading of the kernel.
Resetting the Root Password
For RHEL/Centos 8x, and Fedora the line starts with 'linux'.
Add 'rd.break' at the end of that line (There are other things you can do
here, but for now, this is all you need) [ Note: This change is
temporary ].
Remount the root partition in read-write mode so that you can run
commands. Enter the following: mount -o remount rw /sysroot and then
hit ENTER.
Now type chroot /sysroot and hit enter. This will change you into the
sysroot (/) directory, and make that your path for executing commands.
Resetting the Root Password
Now you can simply change the password for root using the passwd
command.
Next, before you reboot, you will need to make sure that SELinux
allows the file changes. At the prompt ,enter: touch /.autorelabel.
This will signal SELinux on the next reboot that the filesystem has
changed (the changed password) and allow the change to be
loaded. This will cause the whole filesystem to be 'relabeled' which
might take a while, depending on the size of the filesystem and the
speed of the machine, so be aware of this possibility.
type:
$ sudo systemctl start sshd.service
You can ignore .service and run the