Bookmark this page

Guided Exercise: Analyzing and Managing Remote Servers

In this exercise, you will enable and access Web Console on a server to manage it and to diagnose and resolve issues.

Outcomes

You should be able to use Web Console to monitor basic system features, inspect log files, create user accounts, and access the terminal.

Log in as the student user on workstation using student as the password.

On workstation, run the lab support-cockpit start command. This command runs a start script to determine and alter whether the hosts servera and serverb are reachable on the network.

[student@workstation ~]$ lab support-cockpit start
  1. Use the ssh command to log in to servera as the student user. The systems are configured to use SSH keys for authentication, therefore a password is not required to log in to servera.

    [student@workstation ~]$ ssh student@servera
    Activate the web console with: systemctl enable --now cockpit.socket
    
    [student@servera ~]$ 
    
  2. Web Console is already installed on the system, but it is not activated. Enable and start the cockpit service.

    1. Use the systemctl enable --now cockpit.socket command to enable the Web Console service. Use the sudo command to get superuser privileges, and when prompted use student as the password.

      [student@servera ~]$ sudo systemctl enable --now cockpit.socket
      [sudo] password for student: student
      Created symlink /etc/systemd/system/sockets.target.wants/cockpit.socket -> /usr/lib/systemd/system/cockpit.socket.
      
  3. On workstation, open Firefox and log in to the Web Console interface at servera.lab.example.com. Log in as student using student as the password.

    1. Open Firefox and navigate to https://servera.lab.example.com:9090.

    2. Accept the self-signed certificate by adding it as an exception.

    3. Clear the check box Reuse my password for privileged tasks.

    4. Log in as student using student as the password.

      You are now logged in as a normal user, with minimal privileges.

  4. Verify your current authorization within the Web Console interface.

    1. Click Terminal on the left navigation bar to access the terminal.

      A terminal session opens with the student user already logged in. Use the id command to confirm that command execution works in the embedded terminal.

      [student@servera ~]$ id
      uid=1000(student) gid=1000(student) groups=1000(student),10(wheel) context=unconfined_u:unconfined_r:unconfined_t:s0
      
    2. Click Accounts on the left navigation bar to manage users.

      Move the mouse pointer over the Create New Account button located in the upper-left corner. Notice that the student user is not permitted to create new accounts.

    3. Click the Student User link.

      On the student user's account details page, notice that the user is only permitted to set a new password or to add authorized SSH public keys.

    4. In the upper-right corner, click Student User Log Out .

  5. Access Web Console with administrative privileges.

    1. Log back in to the Web Console interface as the student user with student as the password, but this time select the Reuse my password for privileged tasks check box.

    2. To verify administrative access, confirm that the Privileged label is displayed next to the Student User account name at the upper-right side of the Web Console interface.

  6. To investigate system statistics, click Overview on the left navigation bar.

    This page displays various basic operating system statistics, such as current load, disk usage, disk I/O, and network traffic.

  7. To inspect system logs, click Logs on the left navigation bar.

    This page displays the systemd system logs. Use the buttons located in the upper-left corner to modify how log entries are displayed based on date and the severity of the logs.

    1. Click the Severity list and choose Everything.

    2. 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 host name, the SELinux context, or the PID number of the process that the entry corresponds to.

  8. Add a second IP address to an existing network interface device.

    1. Click Networking 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 related to networking.

    2. Scroll down to the the Interfaces section and click the row for the network interface name.

      A details page displays real-time network statistics, as well as the current configuration for that network interface.

    3. Click the Address 172.25.250.10/24 via 172.25.250.254 link.

      An IPv4 Settings window opens where you can change the network interface configuration.

    4. In the IPv4 Settings window, click + next to Manual.

    5. In the Address text box, enter 172.25.250.99 as the second IP Address.

    6. In the Prefix length or Netmask text box, enter 24 as the netmask value.

    7. Click Apply to save the new network configuration.

      Notice that the new configuration is immediately applied. The new IP Address is visible in the IPv4 line.

  9. Create a new user account.

    1. Click Accounts on the left navigation bar.

    2. Click Create New Account.

    3. In the Create New Account window, add the following details:

      Field Value
      Full Namemanager1
      User Namemanager1
      Passwordredh@t!23
      Confirmredh@t!23
    4. Click Create.

  10. Access a terminal session within Web Console to add the manager1 user to the wheel group.

    1. Click Terminal on the left navigation bar.

    2. Use the id manager1 command to view the group membership of the manager1 user.

      [student@servera ~]$ id manager1
      uid=1001(manager1) gid=1001(manager1) groups=1001(manager1)
      [student@servera ~]$ 
    3. Use the sudo usermod -aG wheel manager1 command to add manager1 to the wheel group.

      [student@servera ~]$ sudo usermod -aG wheel manager1
      [sudo] password for student: student
      [student@servera ~]$ 
    4. Use the id manager1 command to verify that manager1 is a member of the wheel group.

      [student@servera ~]$ id manager1
      uid=1001(manager1) gid=1001(manager1) groups=1001(manager1),10(wheel)
      [student@servera ~]$ 
  11. Enable and start the Kernel process accounting service (psacct).

    1. Click Services on the left navigation bar.

    2. Search for the Kernel process accounting service. Click the service link. A details page displays the service status as disabled.

    3. Click the Start and Enable button next to the service name.

    4. The service is now enabled and started.

  12. Log off from the Web Console interface.

  13. Log off from servera.

    [student@servera ~]$ exit
    [student@workstation ~]$ 
    

Finish

On workstation, run the lab support-cockpit finish script to finish this exercise.

[student@workstation ~]$ lab support-cockpit finish

This concludes the guided exercise.

Revision: rh124-8.2-df5a585