Comprehensive reviews:
Manage Users and Groups, Permissions, and Processes
Specifications
Identify and terminate the process that currently uses the most CPU time.
Create the database group with a GID of 50000.
Create the
dbadmin1user and configure it with the following requirements:Add the
databasegroup as a secondary group.Set the password to
redhatand force a password change on first login.Allow the password to change after 10 days since the day of the last password change.
Set the password expiration to 30 days since the day of the last password change.
Allow the user to use the
sudocommand to run any command as the superuser.Configure the default
umaskas 007.
Create the
/home/student/grading/review2directory withdbadmin1as the owning user and thedatabasegroup as the owning group.Configure the
/home/student/grading/review2directory so that thedatabasegroup owns any file that is created in this directory, irrespective of which user created the file.Configure the permissions on the directory to allow members of the
databasegroup and thestudentuser to access the directory and create contents in it.All other users should have read and execute permissions on the directory.
Ensure that users are allowed to delete only files that they own from the
/home/student/grading/review2directory
Configure and Manage a Server
Specifications
Generate SSH keys for the
studentuser onserverb. Do not protect the private key with a passphrase. Save the private and public keys as the/home/student/.ssh/review3_keyand/home/student/.ssh/review3_key.pubfiles respectively.Configure the
studentuser onserverato accept logins authenticated by thereview3_keySSH key pair. Thestudentuser onserverbshould be able to log in toserverausing SSH without entering a password.On
serverb, configure thesshdservice to prevent the root user from logging in.On
serverb, configure thesshdservice to prevent users from using their passwords to log in. Users should still be able to authenticate logins using an SSH key pair.Create a
/tmp/log.tartar archive containing the contents of the/var/logdirectory onserverb. Remotely transfer the tar archive to the/tmpdirectory onservera, authenticating as thestudentuser with thereview3_keyprivate key.Configure the
rsyslogservice onserverbto log all debug priority messages or higher to the/var/log/grading-debugfile. Define the configuration in the/etc/rsyslog.d/grading-debug.conffile.Install the
zshpackage on theserverbmachine.Set the time zone of
serverbtoAsia/Kolkata.
Manage Networks
Specifications
On
serverb, determine the name of the Ethernet interface and its active connection profile.
Network Configuration Parameters:
IPv4 address
172.25.250.111
Netmask
255.255.255.0
Gateway
172.25.250.254
DNS Server
172.25.250.254
On
serverb, create a static connection profile for the available Ethernet interface. The static profile statically sets network settings and does not use DHCP. Configure the static profile to use the network settings in the table above.Set the
serverbhostname toserver-review4.lab4.example.com.On
serverb, setclient-review4as the canonical hostname for theservera172.25.250.10 IPv4 address.Configure the static connection profile with an additional IPv4 address of 172.25.250.211 with a netmask of 255.255.255.0. Do not remove the existing IPv4 address. Ensure that
serverbresponds to all addresses when the static connection is active.On
serverb, restore the original network settings by activating the original network connection profile.
Mount File Systems and Find Files
Specifications
Identify the unmounted block device that contains an XFS file system on the
serverbmachine. Mount the block device on the/review5-diskdirectory.Locate the
review5-pathfile. Create the/review5-disk/review5-path.txtfile that contains a single line with the absolute path to thereview5-pathfile.Locate all the files that the
contractor1user and thecontractorgroup own. The files must also have the octal permissions of640. Save the list of these files in the/review5-disk/review5-perms.txtfile.Locate all files with a size of 100 bytes. Save the absolute paths of these files in
/review5-disk/review5-size.txt.
Fix Boot Issues and Maintain Servers
Specifications
On
workstation, run the/tmp/rhcsa-break1script. This script causes an issue with the boot process onserverband then reboots the machine. Troubleshoot the cause and repair the boot issue. When prompted, useredhatas the password of the root user.On
workstation, run the/tmp/rhcsa-break2script. This script causes the default target to switch from the multi-user target to the graphical target on theserverbmachine and then reboots the machine. Onserverb, reset the default target to use the multi-user target. The default target settings must persist after reboot without manual intervention. As thestudentuser, use thesudocommand for performing privileged commands. Usestudentas the password when required.On
serverb, schedule a recurring job as thestudentuser that executes the/home/student/backup-home.shscript hourly between 7 PM and 9 PM every day except on Saturday and Sunday. Download the backup script fromhttp://materials.example.com/labs/backup-home.sh. Thebackup-home.shscript backs up the/home/studentdirectory fromserverbtoserverain the/home/student/serverb-backupdirectory. Use thebackup-home.shscript to schedule the recurring job as thestudentuser.Reboot the
serverbmachine and wait for the boot to complete before grading.
Configure and Manage File Systems and Storage
Specifications
On
serverb, configure a new 1 GiBvol_homelogical volume in a new 2 GiBextra_storagevolume group. Use the unpartitioned/dev/vdbdisk to create the partition.Format the
vol_homelogical volume with the XFS file-system type, and persistently mount it on the/user-homesdirectory.On
serverb, persistently mount the/sharenetwork file system thatserveraexports on the/local-sharedirectory. Theserveramachine exports theservera.lab.example.com:/sharepath.On
serverb, create a new 512 MiB swap partition on the/dev/vdcdisk. Persistently mount the swap partition.Create the
productionuser group. Create theproduction1,production2,production3, andproduction4users with theproductiongroup as their supplementary group.On
serverb, configure the/run/volatiledirectory to store temporary files. If the files in this directory are not accessed for more than 30 seconds, the system automatically deletes them. Set0700as the octal permissions for the directory. Use the/etc/tmpfiles.d/volatile.conffile to configure the time-based deletion of the files in the/run/volatiledirectory.
Configure and Manage Server Security
Specifications
On
serverb, generate an SSH key pair for thestudentuser. Do not protect the private key with a passphrase.Configure the
studentuser onserverato accept login authentication with the SSH key pair that you generated on theserverbmachine. Thestudentuser onserverbmust be able to log in toserveravia SSH without entering a password.On
servera, check the/user-homes/production5directory permissions. Then, configure SELinux to run in the permissive mode by default.On
serverb, verify that the/localhomedirectory does not exist. Then, configure theproduction5user's home directory to mount the/user-homes/production5network file system. Theservera.lab.example.commachine exports the file system as theservera.lab.example.com:/user-homes/production5NFS share. Use theautofsservice to mount the network share. Verify that theautofsservice creates the/localhome/production5directory with the same permissions as onservera.On
serverb, adjust the appropriate SELinux Boolean so that theproduction5user may use the NFS-mounted home directory after authenticating with an SSH key. If required, useredhatas the password of theproduction5user.On
serverb, adjust the firewall settings to reject all connection requests from theserveramachine. Use theserveraIPv4 address (172.25.250.10) to configure the firewall rule.On
serverb, investigate and fix the issue with the failing Apache web service, which listens on port30080/TCPfor connections. Adjust the firewall settings appropriately so that the port30080/TCPis open for incoming connections.
Run Containers
Specifications
On
serverb, configure thepodmgruser withredhatas the password and set up the appropriate tools for thepodmgruser to manage the containers for this comprehensive review. Configureregistry.lab.example.comas the remote registry. Useadminas the user andredhat321as the password to authenticate. You can use the/tmp/review4/registry.conffile to configure the registry.The
/tmp/review4/container-devdirectory contains two directories with development files for the containers in this comprehensive review. Copy the two directories under the/tmp/review4/container-devdirectory to thepodmgrhome directory. Configure the/home/podmgr/storage/databasesubdirectory so that you can use it as persistent storage for a container.Create the production DNS-enabled container network. Use the
10.81.0.0/16subnet and10.81.0.1as the gateway. Use this container network for the containers that you create in this comprehensive review.Create the
db-app01detached container based on theregistry.lab.example.com/rhel8/mariadb-103container image with the lowest tag number in the production network. Use the/home/podmgr/storage/databasedirectory as persistent storage for the/var/lib/mysql/datadirectory of thedb-app01container. Map the13306port on the local machine to the3306port in the container. Use the following environment variables to create the containerized database:VariableValueMYSQL_USER
developer
MYSQL_PASSWORD
redhat
MYSQL_DATABASE
inventory
MYSQL_ROOT_PASSWORD
redhat
Create a
systemdservice file to manage thedb-app01container. Configure thesystemdservice so that when you start the service, thesystemddaemon keeps the original container. Start and enable the container as asystemdservice. Configure thedb-app01container to start at system boot.Copy the
/home/podmgr/db-dev/inventory.sqlscript into the/tmpdirectory of thedb-app01container and execute it inside the container. If you executed the script locally, you would use the following command:mysql -u root inventory < /tmp/inventory.sql.Use the container file in the
/home/podmgr/http-devdirectory to create thehttp-app01detached container in the production network. The container image name must behttp-clientwith the9.0tag. Map the8080port on the local machine to the8080port in the container.Use the
curlcommand to query the content of thehttp-app01container. Verify that the output of the command shows the container name of the client and that the status of the database is "up".
Last updated
Was this helpful?