Bookmark this page

Lab: Accessing a Linux System

Access a Linux desktop and add a standard user. Using a Linux terminal, gather information about the system and set the hostname.

Outcomes

  • Use a virtual console and the Cockpit console to update passwords.

  • Review the machine's time clock status.

As the student user on the workstation machine, use the lab command to prepare your environment for this exercise, and to ensure that all required resources are available.

[student@workstation ~]$ lab start access-review

In this scenario, you have multiple accounts on the machine. You update the password for each of those accounts by switching to the account first.

Instructions

  1. On the fourth virtual console, update the developer1 user's password. Set lab2-rh104-1 as the new password.

    1. Switch to the fourth virtual console by pressing Alt+Ctrl+F4. Log in as the developer1 user and use redhat as the password.

    2. Review the passwd command help information. The --help (or -h) option prints information about the command itself, and the options you can use to alter the command's outcome.

      [developer1@workstation ~]$ passwd --help
      Usage: passwd [OPTION...] <accountName>
        -k, --keep-tokens       keep non-expired authentication tokens
        -d, --delete            delete the password for the named account (root only); also removes password lock if any
      ...output omitted...
    3. Update the developer1 user password to lab2-rh104-1. Use redhat as the current password.

      [developer1@workstation ~]$ passwd
      Changing password for user developer1.
      Current password: redhat
      New password: lab2-rh104-1
      Retype new password: lab2-rh104-1
      passwd: all authentication tokens updated successfully.
    4. Test the new password by closing the session and logging back in.

      [developer1@workstation ~]$ exit
      
      workstation login: developer1
      Password: lab2-rh104-1
      [developer1@workstation ~]$
    5. Close the virtual console session.

      [developer1@workstation ~]$ exit
    6. Return to the desktop session by pressing Alt+Ctrl+F2.

      $ Alt+Ctrl+F2
  2. On the Cockpit console, update the developer2 user's password. Set lab2-rh104-2 as the new password.

    1. Click Activities in the upper left of the desktop, and type and select Firefox. Navigate to https://localhost:9090. Authenticate by using developer2 as the user and redhat as the password. Click Log in.

    2. In the left panel, click Accounts > developer2, and then click Set password.

    3. Use redhat as the Old password. Enter lab2-rh104-2 as the New password. Confirm the new password. Click Set password.

    4. Confirm that the developer2 user's password is updated.

      Log out of the Cockpit console by clicking Session in the upper right corner. Click Log out. Authenticate by using developer2 as the user and lab2-rh104-2 as the password. Click Log in.

    5. Log out of the Cockpit console by clicking Session in the upper right corner. Click Log out. Close the Firefox window.

  3. Ensure that the machine time clock is synced with a time server.

    1. Review the system clock by using the date command.

      [student@workstation ~]$ date
      Fri Sep 29 14:24:58 EDT 2023

      The information given by the date command is not enough to determine whether the system clock is synced with a time server.

    2. Review the system clock by using the timedatectl command.

      [student@workstation ~]$ timedatectl
                     Local time: Fri 2023-09-29 14:25:56 EDT
                 Universal time: Fri 2023-09-29 18:25:56 UTC
                       RTC time: Fri 2023-09-29 18:25:56
                      Time zone: America/New_York (EDT, -0400)
      System clock synchronized: yes
                    NTP service: active
                RTC in local TZ: no

      The output shows that the system clock is synced with a time server.

Evaluation

As the student user on the workstation machine, use the lab command to grade your work. Correct any reported failures and rerun the command until successful.

[student@workstation ~]$ lab grade access-review

Finish

As the student user on the workstation machine, use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish access-review

Revision: rh104-9.1-3d1f2bc