Alright, time for task 2, getting administrative access.
So use the appropriate solution to reset the root password on server 2, assuming that you
have lost the root password and have no administrative access to the server anymore.
Let me show you.
So here we have server 2, and well, on the prompt we don't know what to do.
Then we need to restart the server.
And while restarting, we need to access the grub interface.
So press E for edit when you see the grub boot menu.
And if you don't see the grub boot menu, just reset your server while it is restarting.
It will pop up the next time you boot it.
And then the recommended way is to use the kernel boot argument and it is slash bin slash
bash.
Control X to start it.
So this will get you into a troubleshooting mode where you have access to a root shell.
And the problem is that in this troubleshooting mode, your root file system is mounted read-only.
So we are going to use mount minus o remount comma rw on slash.
And that makes that the root file system is read-writable.
And then we can use passwd and set the new password to going once and going twice.
And now the password is updated successfully.
Do not forget the touch slash dot auto relabel.
And then you can restart it.
Now we are in init is bin bash and in init is bin bash, you cannot restart the ordinary
way.
And that is why you need exec slash user slash lib slash systemd slash systemd.
And that will replace the current bash shell with systemd and call to server to start normally.
Now right here, you can see that SELinux is relabeling.
That will take a moment.
Then it will reboot.
And after the reboot, you should have access to your system again, including a root access.
So here's the login prompt.
And let me verify that I can get in as user root.
And as you can see, that worked out all right.