Red Hat System Administration I
Enable and access the web console on a server to manage it and to diagnose and resolve issues.
Outcomes
Use the web console to monitor system features, inspect log files, create user accounts, and access the terminal.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command prepares your environment and ensures that all required resources are available.
[student@workstation ~]$ lab start support-cockpit
Instructions
Log in to the
serveramachine as thestudentuser.[student@workstation ~]$
ssh student@servera[student@servera ~]$The web console is already installed on the system, but it is not active. Enable and start the
cockpitservice.Enable the web console service.
[student@servera ~]$
sudo systemctl enable --now cockpit.socket[sudo] password for student:studentCreated symlink /etc/systemd/system/sockets.target.wants/cockpit.socket -> /usr/lib/systemd/system/cockpit.socket.
On the
workstationmachine, open the Firefox web browser and log in to the web console interface atservera.lab.example.com. Log in as thestudentuser.Open the browser and navigate to https://servera.lab.example.com:9090.
Accept the self-signed certificate by adding it as an exception.
Log in as the
studentuser, withstudentas the password.You are now logged in to the web console as a normal user, with minimal privileges.
Verify your current authorization within the web console interface.
Click the button on the left navigation bar to access the terminal.
A terminal session opens where the
studentuser is already logged in. Verify that command execution works in the embedded terminal.[student@servera ~]$
iduid=1000(student) gid=1000(student) groups=1000(student),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023Click the button on the left navigation bar to manage users.
The button does not appear, because you are logged in with limited access.
Click the link.
On the
studentuser's account details page, you can only set a new password or add an authorized SSH public key.
Escalate privileges in the web console.
Click the button to switch to administrative access. Use
studentas thestudentuser password and click the button. The web console replaces the button by the button.
To investigate system statistics, click on the left navigation bar and the button on the section.
This page displays various operating system statistics, such as current load, disk usage, disk I/O, and network traffic.
To inspect system logs, click the button on the left navigation bar.
This page displays the
systemdsystem logs. Use the buttons in the upper-left corner to modify how the web console displays the log entries based on date and the priority of the logs.Click the list and choose .
Based on the current day of the month, click any log entry from the list. A log entry detail page opens with additional information about the event, such as the hostname, the SELinux context, or the PID number of the process that the entry corresponds to.
Add a second IP address to an existing network interface device.
Click the button on the left navigation bar.
This page displays details of the current network configuration for
servera, as well as real-time network statistics, firewall configuration, and log entries about networking.Scroll down to the section and click the row for the
eth0network interface.A details page displays real-time network statistics, as well as the current configuration for that network interface.
Click the link in the section.
An window opens, where you can change the network interface configuration.
In the window, click the button next to the list.
In the text box, enter
172.25.250.99as the second IP address.In the text box, enter
24as the netmask value.Click to apply new network configuration.
The new configuration is applied immediately in the web console. The new IP address is visible in the line.
Create a user account.
Click the button on the left navigation bar. The web console now shows the button, because you have administrative rights.
Click the button.
In the window, add the following details:
Field Value Full Name manager1User Name manager1Password redh@t!23Confirm redh@t!23Click .
Access a terminal session within the web console to add the
manager1user to thewheelgroup.Click the button on the left navigation bar.
Use the
id manager1command to view the group membership of themanager1user.[student@servera ~]$
id manager1uid=1002(manager1) gid=1002(manager1) groups=1002(manager1)Use the
sudo usermod -aG wheel manager1command to add themanager1user to thewheelgroup.[student@servera ~]$
sudo usermod -aG wheel manager1[sudo] password for student:studentUse the
id manager1command again to verify that themanager1user is a member of thewheelgroup.[student@servera ~]$
id manager1uid=1002(manager1) gid=1002(manager1) groups=1002(manager1),10(wheel)
Enable and start the Kernel process accounting service (
psacct).Click the button on the left navigation bar.
Search for the
psacctservice. Click the service link. A details page displays the service status as disabled.Click the button next to the service name.
The service is now enabled and started.
Log off from the web console interface.
Return to the
workstationsystem as thestudentuser.[student@servera ~]$
exit[student@workstation ~]$