Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Practice Exam Lab for PE124

*This course is not approved or sponsored by Red Hat.* This hands-on lab is built around the objects identified by Red Hat for the `Preliminary Exam in Red Hat System Administration I (PE124)`. The PE124 exam is a practical, scenario-based exam. This lab is not an exact copy of the exam; however, it is designed to provide possible tasks and situations that you might encounter when taking the exam. The lab will cover scenarios across five main objectives with numerous individual tasks. The lab will have a 1.5-hour time limit, while the actual `PE124` exam will only allow 1 hour. Your ultimate goal should be to complete this lab in 1 hour or less to stay in line with the exam. Practice with this lab as many times as necessary to make sure you are comfortable with the tasks and time limits. Good luck with your studies!

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Beginner
Duration
Clock icon 1h 0m
Published
Clock icon Dec 04, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Accessing Systems and Information

    1. Connect to the primary Red Hat system.
      • Collect the IP Address, user account, and password for the primary system.
      • Use this information to connect to the system using ssh.
    2. Review the scp command options.
      • Confirm the proper command syntax for the scp command, using either the man or info commands.
    3. Use scp to copy a local file to the secondary Red Hat system.
      • With the proper syntax in mind, collect the IP Address, user account and password for the secondary system.
      • Using these credentials and the proper command syntax, use scp to copy the .bashrc file to the /home/cloud_user directory on the secondary system.
    4. Use scp to copy a remote file to the local system.
      • Download the /home/cloud_user/build/devsys12-account-audit.log file from the secondary system to the audit directory on the primary system.
  2. Challenge

    User and Group Management

    1. Add 5 users to the system.
      • Add the following user accounts to the system. Set the comment option to the user's full name and user ID to the value provided.
        • Peter Gibbons, User name = pgibbons, User ID = 20001
        • Michael Bolton, User name = mbolton, User ID = 20002
        • Samir Nagheenanajar, User name = snagheenanajar, User ID = 20003
        • Milton Waddams, User name = mwaddams, User ID = 20004
        • Tom Smykowski, User name = tsmykowski, User ID = 20005
      • Set to the default password for each account to initech123.
    2. Add 2 groups to the system.
      • Using groupadd, add the following groups to the system.
        • devopsadmins
        • helpdeskadmins
    3. Add users to the new groups.
      • Add the following user accounts to the devopsadmins group.
        • Peter Gibbons
        • Michael Bolton
        • Samir Nagheenanajar
      • Add the following user accounts to the helpdeskadmins group.
        • Milton Waddams
        • Tom Smykowski
    4. Grant superuser privileges using the new groups.
      • Use the visudo command to create a new file in the /etc/sudoers.d directory and call the file 20-groups.
      • Add the following group configurations to the file.
        • The devopsadmins group should be able to connect from any host, act as the root user and be able to run any command.
        • The helpdeskadmins group should be able to connect from any host, act as the root user and only run the ls and cat commands.
    5. Validate superuser access for at least two of the accounts, one from each group.
      • Switch to one of the users from the devopsadmins group. As the user, attempt to run the following commands with elevated privileges.
        • List the contents of the root user's home directory.
        • Use the cat command to view the /etc/sudoers file.
        • Use the less command to view the /etc/sudoers file.
        • Exit the user session and return to the cloud_user account.
      • Use the su - command to switch to one of the users from the helpdeskadmins group. As the user, attempt to run the following commands with elevated privileges.
        • List the contents of the root user's home directory.
        • Use the cat command to view the /etc/sudoers file.
        • Use the less command to view the /etc/sudoers file.
        • Exit the user session and return to the cloud_user account.
  3. Challenge

    Managing Files and Directories

    1. Create an archive directory and softlink in your home directory.
      • Using the mkdir command, create a directory called archives.
      • Using the ln command, create a softlink to /var/log and call it logfiles.
    2. Create and copy files to the archives directory.
      • Copy the messages and secure log files to the archives directory, using the logfiles softlink as the source.
      • Use output redirection to send the contents of /etc/passwd and /etc/group to a file called audit.log in the archives directory.
      • Send a list of the /var/log directory contents to a file called loglist.txt in the archives directory.
    3. Create a tar archive of the archives directory, add a file to the archive and compress the it.
      • Use the tar command to create tarball of the archives directory.
      • Add the .bashrc file to the tarball.
      • Use gzip to create a compressed archive, preserving the original tar archive.
    4. Create the team directory, configure ownership & permissions and restrict access.
      • Create a directory called devops in the /data directory.
      • Update the ownership to nobody:devopsadmin.
      • Update directory permissions to the following configuration:
        • owner/group = read, write, execute
        • other = none
        • Enable SGID
        • Enable the Sticky bit
    5. Validate access to the directory.
      • As the cloud_user, attempt to change to the /data/devops directory.
      • Switch to the pgibbons user account.
        • Attempt to change the devops directory.
        • As pgibbons, attempt to create a file called pgibbons-test.
        • Exit the session and return to the cloud_user account.
      • Switch to the mbolton account.
        • Attempt to change to the devops directory.
        • Attempt to rename the pgibbons-test file to mbolton-test.
        • Attempt to delete the pgibbons-test file.
        • Exit the session and return to the cloud_user account.
  4. Challenge

    Systems Management

    1. Stop and mask a service to prevent it from starting.
      • Check the mariadb service status.
      • Use systemctlto stop the mariadb service.
      • Mask the mariadb service using systemctl.
      • Attempt to start the mariadb service to confirm it is properly masked.
    2. Determine if journals are configured to be persistent and update the configuration if necessary.
      • Check to see if the /var/log/journal directory exists.
      • Create the /var/log/journal directory.
      • Confirm journal data is being written to the directory.
      • Update the journald configuration to limit the size of journal files to 50M.
    3. Install PostgreSQL using the newest module stream.
      • Use yum module to install the newest PostgreSQL stream.
      • Review the status of the PostgreSQL service to confirm it is installed.
    4. Remove an installed package from the system.
      • Check to see if MariaDB is installed.
      • Use yum to uninstall the MariaDB package.
    5. Use the rpm command to install a local rpm package.
      • Check to see if the package for wget is installed.
      • Use rpm to install the wget package located in the cloud_user's home directory.
      • Confirm wget is installed by checking the version.
  5. Challenge

    Networking

    1. View and update hostname information.
      • Use hostnamectl to view hostname details.
      • Set a new hostname, pe124lab, for the system.
      • Set a pretty name, PE124 Lab Server, for the system.
      • Confirm new values were updated using hostnamectl.
    2. Update name resolution.
      • Add a line to the /etc/hosts file, using the local IP Address and the value rh8lab.
      • Ping rh8lab to confirm hosts entry works.
      • Use nmcli to view network connections.
      • Add the DNS server 8.8.8.8 to the default connection, System eth0.
      • Reload the interfaces and cycle the NetworkManager service to pickup the changes.
      • Confirm the /etc/resolv.conf contains the new DNS server.
    3. Drop and recreate the secondary network connection.
      • Use nmcli to view network connections.
      • Delete the secondary connection, Wired connection 1.
      • Recreate the connection with the following details.
        • Name: New connection
        • Interface name: eth1
        • Type: ethernet
        • IP Address: 10.0.10.10
        • Gateway: 10.0.10.1
      • Confirm the connection was created.
      • Confirm the new interface has the correct IP Address.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans