Linux Pro Practice Cert

25 July 2022
4.7 (114 reviews)
88 test answers

Unlock all answers in this set

Unlock answers (84)
question
According to the command help, which switch can you use with the killall command to kill a process group instead of just a process?
answer
-g Use -g with the killall command to kill a process group. To find the correct switch to use, type: killall -h or killall --help
question
What does the -M switch do with the useradd command?
answer
Prevents the home directory from being created regardless of system settings. Entering useradd -h or useradd --help shows you that the -M switch with the useradd command prevents the home directory from being created, regardless of the system settings.
question
According to the command help, what does the -G do with the usermod command?
answer
Assigns a user to a new list of supplementary groups. Use the usermod command with the -G switch to assign a user to a new list of supplementary, or secondary group. Using -G will replace the user's current list of secondary groups with the new list used with the command.
question
View the currently set environmental variables to find the values below. HOME LANG SHELL TERM
answer
HOME -> /root LANG -> en_US.UTF-8 SHELL -> /bin/bash TERM -> linux Use the set command to view a list of variables, or use the echo $ variable command to show each variable individually. For example, use the echo $SHELL command to see the value for SHELL.
question
View the contents of the /root/.bash_profile file. What is the last word in the file?
answer
PATH The last word in the file is PATH. Use the cat /root/.bash_profile command to view the contents of the file.
question
The /etc/shells file contains a list of shells that are available on the current system. View the contents of the file and answer the following question. Of the shells listed below, which are not available on the system?
answer
/bin/ksh Use cat /etc/shells to view the contents of the file. You should notice that /bin/ksh is not in the list of available shells.
question
You need to use the vim editor to create a script file to change and export the SHELL environmental variable as the C-shell. Tasks: -Open the vim editor with a new file names /etc/pref_shell -Add the following lines to the file SHELL=/bin/csh export SHELL -Save and close
answer
-Type vi /etc/pref_shell -Press a to enter insert mode -Type SHELL=/bin/csh export SHELL -Press esc to exit insert mode -Type : to enter back into command line -Type wq to save the file and exit
question
You have just added a custom script to change and export the SHELL environmental variable as the C-shell. However, you decided to change from the C-shell to tsch. Tasks: -Open /etc/pref_shell in vim -Modify the environmental variable line SHELL=/bin/csh to read SHELL=/bin/tcsh -Save changes
answer
-Type vi /etc/pref_shell to open the file -Press a to edit -Move the cursor to the line SHELL=/bin/csh and insert a t to make the line read SHELL=/bin/tcsh -Press esc -Type :wq to save changes and exit
question
Use fdisk -l to answer the following questions about the partition table.
answer
Which physical disk is the swap area on? - 1st Which disk partition is the swap area on? - 5th What is the beginning cylinder for the swap area? - 9668 What is the allocated size of the swap area in blocks? - 473632 Which physical disk is the boot disk on? - 1st Which disk partition is the boot disk on? - 1st fdisk -l displays the partition table on the device. Identify the swap volume by looking for 83 Linux swap at the end of an entry line. -/dev/sda5 is the 1st physical disk -/dev/sda5 is the 5th partition on the disk -9668 is the beginning cylinder for the swap area -473632 is the allocated size of the swap area in blocks Identify the boot volume by looking for the asterisk (*) in the BOOT column. -/dev/sda1 is the first physical disk. -/dev/sda1 is the first partition on the disk.
question
You've installed a new hard drive and created a partition on the drive. Now you need to format the partition before you can save data on the new hard drive. Task: Format the /dev/sbd1 partition with the ext3 file system.
answer
Use any of the following commands - mke2fs -j /dev/sdb1 (-j enables journaling) - mkfs -t ext3 /dev/sdb1 - mkfs.ext3 /dev/sdb1
question
You've installed a third hard drive and created two partitions on the drive. Now you need to format both partitions. Your task in this lab is to format the partitions with the ext4 file system.
answer
Use one of the following commands to format the 1st partition on the third drive: - mke2fs -t ext4 /dev/sdc1 - mkfs -t ext4 /dev/sdc1 (works) - mkfs.ext4 /dev/sdc1 Repeat the command specifying /dev/sdc2 as the other partition.
question
You recently upgraded your computer and added an extra 512 MB of RAM. Consequently, you want to increase your swap space by adding a new swap area. The second hard disk has an unused partition (/dev/sdb2) that you want to format for the swap area. Tasks: -Create a swap partition on /dev/sdb2. -Activate the swap partition.
answer
Use the following commands: - mkswap /dev/sdb2 - swapon /dev/sdb2
question
You recently installed and formatted a new hard drive in your system. Its device file name is /dev/sdb1. Now you want to mount the volume. Task: -Create the /mnt/disk directory. -Mount /dev/sdb1 to the /mnt/disk directory with the ext3 file system.
answer
Use the following commands: - mkdir /mnt/disk - mount -t ext3 /dev/sdb1 /mnt/disk Use mount command to verify that the volume is correctly mounted. BE AWARE: -Volumes are mounted to empty directories -A common place to mounth volumes is to a directory inside of the /mnt directory -Use the -t option to specify the file system
question
The /dev/sdb2 volume is mounted to an uncommon mount point directory: /root/newdrive. You need to remove the volume from the /root/newdrive mount point and remount it to the /mnt/drive2 directory. Tasks: Unmount /dev/sdb2 from /root/newdrive Mount /dev/sdb2 to /mnt/drive2
answer
Use umount /root/newdrive to unmount the volume from the mount point directory. Use mount /dev/sdb2 /mnt/drive2 to mount the volume.
question
You need to install a new application from DVD; however, the DVD drive (/dev/dvd or /dev/sr0) is not mounted. Task: Mount the DVD-ROM drive to the /media/dvd directory.
answer
Use mount /dev/dvd /media/dvd to mount the DVD drive. Use ls /media/dvd to verify that you can access the application installation file.
question
Use the df -h command to answer the following questions:
answer
How much space is used on /dev/sda2? -1.2G How much space is still available on /dev/sda2? -2.8G What percentage of space is used on /dev/sda1? -52% The df command shows you the amount of free space you have left on mounted drives. Using the -h option allows you to see the output in human-readable form.
question
You are logged on as Will Adams (wadams), and your working directory it /home/wadams. Use the du command to answer the following questions:
answer
How big is the /home/wadams directory? - 100k What is the largest directory in /home/wadams? - ./.config What is the size of the ./.config/ibus/bus directory? - 40k
question
What is your current working directory?
answer
/home/wadams -Type pwd to show current working directory
question
You need to view detailed information for the hr directory in the root (/) directory and answer the following questions?
answer
What is the directory size? -12586 What is the modified date? -Mar 15 2009 -Type ls -l /
question
What is the name of the hidden directory in /hr?
answer
sanford -Type ls -a /hr Hidden directories and files begin with a period and are not shown with the normal ls command. Use ls -a to view all current directory contents.
question
You are preparing to manage a new project code named White Horse. You need to prepare directories for White Horse documents. You are logged in as user wadams. Task: -Create a directory called wh directly inside /home/wadams. -Create three following directories in /home/wadams/wh: -plan -research -implement
answer
-Type: mkdir /home/wadams/wh (to make directory called wh) -Type: mkdir /home/wadams/wh/plan mkdir /home/wadams/wh/research mkdir /home/wadams/wh/implement (to put directories in the one you just made)
question
Your company recently changed directions and decided to terminate three products. All of the necessary files have been backed up, archived, and deleted. Now, you need to remove the directories from the /projects directory. Tasks: Delete the following directories in the /projects directory: -heartbt -heartmon -heartstrng
answer
Type: - rmdir /projects/heartbt - rmdir /projects/heartmon - rmdir /projects/heartstrng Use ls -l /projects to verify deletion.
question
Someone created duplicate versions of three project documents. To avoid version control problems, you want to delete the duplicate files. Task: Delete the following files: darkhorse1 camouflage1 endgame1
answer
Type: - rm -f /projects/darkhorse1 - rm -f /projects/camouflage1 - rm -f /projects/endgame1 Use ls -l /projects to verify deletion.
question
Peter Lacy (placy) has taken an extended leave from the company for personal reasons. However, he was working on a critical project code named White Horse with several other employees. The project leader requested that you move any White Horse documents in Peter Lacy's home directory to the home directory of Brenda Cassini (bcassini). You are logged on as wadams. Task: -Switch to the root user, using 1worm4b8 for the root user password. (You must have root user permissions to move other people's files.) -Move the following files in placy's home directory to bcassini's home directory. -confid_wh -projplan_wh
answer
Type: su - 1worm4b8 (this is the provided password, it doesn't show on screen.) mv /home/placy/confid_wh /home/bcassini mv /home/placy/projplan_wh /home/bcassini Use ls -l /home/bcassini to verify new location files. The mv command moves files, however you have to log in as the root user first in order to move other people's files.
question
The White Horse project is complete. Everything produced under the code name has been backed up and removed from the system. You now want to remove the White Horse directory structure from your system. Task: Delete the /home/wadams/wh directory and all of its contents.
answer
Type: rm -rf wh (-r) deletes directories and all its files (-f) deletes without prompting
question
Will Adams (wadams) owns and maintains a database file in /home/wadams called contacts.db. The file holds contact information for perspective clients. Brenda Cassini (bcassini) and Vera Edwards (vedwards) want to access and add contact information to the file to share the data among the three users. Task: Create hard link files to /home/wadams/contacts.db as follows: -Use contacts_link as the hard link name -Create the file in the following directories: /home/bcassini /home/vedwards
answer
Type: ln /home/wadams/contacts.db /home/bcassini/contacts_link ln /home/wadams/contacts.db /home/vedwards/contacts_link
question
Your company uses a proprietary graphics program called imitator that is stored in the /root directory. Maggie Brown (mbrown) needs to create and modify images with the imitator program. Task: Create a symbolic link file to /root/imitator as follows: -Use imitator_link as the symbolic link name -Create the file in /home/mbrown
answer
Type: ln -s /root/imitator /home/mbrown/imitator_link
question
You need to send a backup copy of the /etc directory across the network. Task: -Create a compressed archive of the /sales directory and all its contents -Save the file in the root directory (/) with the name /salesbkp.tar.gz
answer
Type: tar -zcf /salesbkp.tar.gz /sales Using the tar commands with the -cf switches to create a new archive file. Use -z as the preceding option to compress the file.
question
An employee in another department recently provided several important files for your current assignment. The files are compressed in a tar file. Today you need to extract each file and begin to use the files. Task: Extract the files in /proj_files.tar.gz into the /projects directory.
answer
Type: tar -xzf /proj_files.tar.gz -C /projects
question
Use the quota command to review the quota information for the wadams user account. Answer the following questions:
answer
Type: quota What is the blocks quota? -18432 What is the blocks limit? -20480 What is the files quota? -500 What is the files limit? -550
question
Use repquota -a to answer the following questions:
answer
Which user does not have a quota limit? -root What is the hard block limit for most users? -10240 What is the soft block limit for most users? -9216 What is the highest set hard block limit? -20480 Which user has the highest set hard block limit? -wadams
question
To prevent the users from using too much disk space, you have implemented hard and soft quotas on the root directory (/). Today you noticed that the quotas are turned off. Task: Re-enable quotas for the root directory (/).
answer
Type: quotaon /
question
The system is running hard disk quotas for users and groups. Task: Disable the quotas on the root directory (/).
answer
quotaoff /
question
Sam Chan (schan) has reached his user quota limit. Rather than delete some of his files, he wants more space. Your manager has approved an increase in his quota limit. Task: Increase the hard and soft block limits on the schan user account to 1048576 kb (1Gb).
answer
Type: edquota -u schan i (to insert) Edit hard and soft numbers :wq (to save and exit) Use repquota -a to generate the report and confirm the changes.
question
Users have complained that the 7 day default grace period for soft limits is too short. Increase the block and file (inode) grace period for users from 7 to 30 days.
answer
Type: edquota -u -t i (to edit) make changes :wq (to save and exit)
question
The IT manager in your organization has asked you to change the GRUB_TIMEOUT parameter from 5 seconds to 10 seconds to give the users more time to make a menu selection from the GRUB menu before the default operating system is booted. Once you have changed the GRUB_TIMEOUT parameter from 5 seconds to 10 seconds, reboot the operating system to see the changes made to the wait time from the GRUB menu. After rebooting the operating system, login with the username root and password 1worm4b8. Tasks: -Change the GRUB_TIMEOUT parameter from 5 seconds to 10 seconds -Reboot the operating system to see the changes made to the wait time from the GRUB menu -Login with the username root and password 1worm4b8
answer
Type: vi /etc/default/grub i change first line of file to GRUB_TIMEOUT=10 esc :wq grub2-mkconfig -o /boot/grub2/grub.cfg reboot root 1worm4b8
question
The IT manager has asked you to setup dual boot capabilities on this Linux system so the user can boot to either Windows 7 or Linux, with Windows 7 being the default boot option. There is an external hard drive connected to this system with Windows 7 installed on it. In this lab, you will configure GRUB 2 to add a Windows 7 menu option and make it the default boot option. Tasks: -Change the default menu option for the GRUB2 boot loader to Windows 7. -Use the grub2-mkconfig command to make the 30_os-prober script find the Windows 7 operating system on the external hard drive and add it as an entry in the boot menu. -Reboot the machine and select the Windows 7 option from the boot menu.
answer
Type: vi /etc/default/grub i GRUB_DEFAULT=Windows 7 esc :wq grub2-mkconfig -o /boot/grub/grub.cfg reboot select windows 7 option
question
You want the boot menu on this Linux system to wait until you make a selection before it boots. You need to modify the GRUB_TIMEOUT parameter to make this happen. Once you have changed this parameter, reboot the operating system to see this change in the behavior of the GRUB menu. After rebooting the operating system, login with the username root and password 1worm4b8. TASK: -Modify the GRUB_TIMEOUT parameter -Reboot the operating system to see the changes made to the wait time from the GRUB menu -Login with the username root and password 1worm4b8
answer
Type: vi /etc/default/grub i Change TIMEOUT to -1 esc :wq grub2-mkconfig -o /boot/grub2/grub.cfg reboot select option root 1worm4b8
question
While working on your Linux server, you want to change to single user mode. You will change to single user mode using the systemctl command and rescue.target. Rescue.target is a special target unit that will run a base system in single user mode and a rescue shell. Task: -Use the systemctl command to make rescue.target the current target. -After changing to rescue.target, log back in as root using the password 1worm4b8
answer
Type: systemctl isolate rescue.target 1worm4b8
question
The Linux sever, that you are the system administrator of, is not functioning properly. To begin your troubleshooting process, you want to set the default target to rescue.target. Rescue.target is a special target unit that will run a base system and a rescue shell. TASK: -Use the systemctl command to make rescue.target the default boot target.
answer
Type: systemctl set-default rescue.target
question
While working on your Linux server, you want to practice starting, stopping, and restarting a service using the systemctl command. In this simulation start, stop, and restart the bluetooth.service service. Task: -Use the systemctl command to start bluetooth.service. -Use the systemctl command to stop bluetooth.service. -Use the systemctl command to restart bluetooth.service.
answer
Type: systemctl start bluetooth.service systemctl stop bluetooth.service systemctl restart bluetooth.service
question
While working on your Linux server, you want to enable anaconda.service and disable vmtoolsd.service using the systemctl command. Task: -Use the systemctl command to enable anaconda.service. -Use the systemctl command to disable vmtoolsd.service.
answer
Type: systemctl enable anaconda.service systemctl disable vmtoolsd.service
question
You have informed users that you need to bring the machine down at the end of the day to perform routine maintenance. However, prior to shutting the system down, you want to give users fifteen minutes to save data and exit the system. Task: -Use a 15 minute delay before shutting down -Use It is time for a shutdown! as a message to all logged-in users
answer
Type: shutdown -h +15 It is time for a shutdown!
question
The power has gone out in your facility. You have a UPS (uninterruptible power source) that protects your system and provides enough power to allow you to shut down safely. Task: -shut down the system immediately using the command line.
answer
Type: shutdown h now halt
question
You've encountered system problems that require you to reboot the system. You want to inform users that the system will shut down and reboot. Task: Send a command to reboot the system in 5 minutes.
answer
Type: shutdown -r +5
question
Use ps aux | less to answer the following questions:
answer
What is the PID for the hald process? -1194 What is the state of the ps aux process? -running What is the percentage of memory used by PID 2156? -2.3 Which command invoked PID 1857? -python
question
As a part of your daily maintenance, you scan for and kill any zombie processes on the system. Task: -Use the ps aux command to find zombie processes -Kill the zombie processes
answer
Type: kill -9 1301 kill -9 1570 kill -9 1980 Zombie processes have a Z in the STAT column of the ps aux output.
question
View various files in the /proc directory to find the answers to the following questions.
answer
What is the CPU speed (in MHz)? Enter the exact total (including decimal places). -1993.392 How much physical memory does the system have (in kB)? Look for the MemTotal line in the corresponding file. -1010712 What is the Linux kernel version? Enter the version in the format of n.n.n.n.-n. -2.6.33.3-85
question
You just got a new PowerMate input device that you want to use on your computer. You don't think that the PowerMate driver was compiled into the kernel of your Linux distribution. Task: Insert the powermate module into the kernel.
answer
Type: modprobe
question
Your manager asked you to remove the gameport module from the Linux print server. View the installed modules on the print server and remove the gameport driver from the kernel. Task: -View the installed modules and identify the gameport module. -Remove the gameport driver module from the kernel.
answer
Type: lsmod rmmod gameport
question
The IT manager in your organization has asked you to install the fontconfig-3.10.87-5.fc24.rpm package, which is located in the /home/wadams/Downloads directory. Task: -Switch to the root user, using 1worm4b8 for the root user password. (You must have root user permissions to install packages.) -Install the package, fontconfig-3.10.87-5.fc24.rpm package, which is located in the /home/wadams/Downloads directory.
answer
Type: su - 1worm4b8 rpm -ivh /home/wadams/Downloads/fontconfig-3.10.87-5.fc24.rpm
question
There is a C debugger package installed on the server that your organization is no longer using. The IT manager in your organization has asked you to uninstall the ddd-C-Debug-2.8.15-3.cd15 package. Task: -Uninstall the ddd-C-Debug-2.8.15-3.cd15 package -Verify that the package ddd-C-Debug-2.8.15-3.cd15 is uninstalled
answer
rpm -e ddd-C-Debug-2.8.15-3.cd15
question
There is a kernel tools package installed on the server. The IT manager in your organization has asked you to upgrade the package using the new package version kernel-tools-10.21.2015-54.fc21.rpm package, which is located in the /root directory. Task: Upgrade the kernel tools package using the new package version kernel-tools-10.21.2015-54.fc21.rpm.
answer
rpm -Uv kernel-tools-10.21.2015-54.fc21.rpm
question
The IT manager in your organization has asked you to install the pulseaudio-equalizer.noarch package. Task: Install the pulseaudio-equalizer.noarch package.
answer
Type: dnf install pulseaudio-equalizer.noarch
question
RunSnakeRun.noarch is a Python GUI package installed on the server that your organization is no longer using. The IT manager in your organization has asked you to uninstall the RunSnakeRun.noarch package by using the dnf command. Task: Use the dnf command to uninstall the RunSnakeRun.noarch package.
answer
dnf erase RunSnakeRun.noarch
question
View the /etc/passwd file to answer the following questions: (Type the answers exactly as they appear in the file.)
answer
What is the UID for the schawla user account? -509 What is the full user's name (GECOS field) for the rcronn user account? -Robert Cronn What is the primary group ID for the ftp user account? -50 What is the path of the home directory for the root user account? -/root
question
View the /etc/group file to answer the following questions:
answer
Which of the following user accounts is not a member of the mgmt1 group? -bcasssini Which of the following users belongs to the devel group? -mbrown What is the sales group ID? -513 What is the name of the group with the ID of 503? -cflynn
question
The VP of Marketing has told you that Paul Denunzio will join the company as a market analyst in two weeks. You need to create a new user account for him. Task: -Create the pdenunzio user account. -Include the full name, Paul Denunzio, as a comment for the user account. -Set the password to eye8cereal.
answer
Type: useradd -c "Paul Denunzio" pdenunzio passwd pdenunzio eye8cereal
question
Brenda Cassini (bcassini) has recently married. You want to update her user account to reflect her new last name. Complete the following tasks: -Rename the user account to bpalmer. -Change the comment field to read Brenda Palmer. -Change the home directory to /home/bpalmer, moving the contents of the old home directory to the new location.
answer
Type: usermod -c "Brenda Palmer" -d /home/bpalmer -m -l bpalmer bcassini cat /etc/passwd ls /home
question
Terry Haslam (thaslam) was dismissed from the organization. His colleagues have harvested the files they need from his home and other directories. Your company security policy states that upon dismissal, users accounts should be removed in their entirety. Task: Remove the thaslam user account and the home directory from the system.
answer
Type: userdel -r thaslam
question
You use a special user account called administrator to log on to your computer; however, you think someone has learned your password. You are logged on as administrator. Task: Change your password to r8ting4str. The password for the administrator account is 7hevn9jan.
answer
Type: passwd 7hevn9jan r8ting4str
question
Salman Chawla (schawla) forgot his password, and needs to access his resources on the computer. Task: -Change the password for the schawla user account to G20oly04. -Make sure the password is encrypted in the shadow file
answer
Type: su -c "passwd schawla"
question
Every seven years, your company provides a 6 week sabbatical for every employee. Vera Edwards (vedwards), Corey Flynn (cflynn), and Bhumika Kahn (bkahn) are leaving today, while Maggie Brown (mbrown), Brenda Cassini (bcassini), and Arturo Espinoza (aespinoza) are just returning. The company security policy mandates that user accounts for employees gone for longer than two weeks be disabled. Task: -Lock (disable) the following user accounts: vedwards cflynn bkahn -Unlock (enable) the following user accounts: mbrown bcassini aespinoza
answer
Type: usermod -l vedwards usermod -l cflynn usermod -l bkhan usermod -u mbrown usermod -u bcassini usermod -u aespinoza
question
Currently all the Sales people in your company belong to a group called sales. The VP of Sales wants two Sales groups: western sales division and eastern sales division. Task: Rename the sales group to western_sales_division. -Create the eastern_sales_division group. -Assign aespinoza as the only member of the eastern_sales_division group.
answer
Type: groupmod -n western_sales_division sales groupadd eastern_sales_division usermod -G eastern_sales_division aespinoza
question
Maggie Brown (mbrown) and Corey Flynn (cflynn) have recently been hired in the Human Resources department. You have already created the two user accounts. Task: Add the hr group as a secondary group for the mbrown and cflynn user accounts.
answer
Type: usermod -G hr mbrown usermod -G hr cflynn
question
The VP of Sales promoted Salman Chawla (schawla) to Regional Sales Director. He will now need the rights and permissions assigned to the mgmt2 and hr groups. You are logged on as root. Task: -Identify all groups to which the schawla user belongs. -Add mgmt2 and hr as secondary groups to the schawla user, but make sure the user is still a member of all current groups.
answer
Type: groups schawla usermod -aG mgmt2,hr schawla
question
Linda Blaine (lblaine) and Rhonda Conger (rconger) are temporary employees who have been auditing your organization's financial documents. Their user accounts are members of the auditors group. They have completed their work and have moved on to new assignments. You need to remove their user accounts and home directories, and the auditors group from the system. Task: -Delete the following user accounts and their corresponding home directories: lblaine rconger -Delete the auditors group.
answer
Type: userdel -r lblaine userdel -r rconger groupdel auditors
question
Corey Flynn (cflynn) currently belongs to several groups. Due to some recent restructuring, he no longer needs to be a member of the hr group. Task: -Remove cflynn from the hr group. -Preserve all other group memberships.
answer
Type: groups cflynn usermod -G mgmt1.it cflynn
question
Salman Chawla (schawla) is no longer part of the sales team and is awaiting reassignment to a new position. In the meantime, you do not want him to have access to sales resources. Task: Remove user schawla from all secondary group memberships.
answer
Type: usermod -G "" schawla
question
Use the ls -l command to view detailed information for the following directories and files to answer the following questions?
answer
Who is the owner for the /sales/orders file? -bcassini Who is the group owner for the /projects/darkhorse file? -proj Who is the owner for the /projects directory? -bcassini Who is the group owner for the /hr directory? -wadams
question
Brenda Cassini (bcassini) is taking over the payroll documentation for Will Adams (wadams). Task: Give the bcassini user ownership of the /hr/payroll file.
answer
Type: chown bcassini /hr/payroll ls -l /hr
question
The hr group currently owns the /hr/personnel file; however, the mgmt1 group should own the file to protect employee privacy. Task: Change the group ownership of the /hr/personnel file from hr to mgmt1.
answer
Type: chgrp mgmt1 /hr/personnel
question
During a random security audit, you found that ownership (and group ownership) for the /hr directory is set to Will Adams (wadams). For security reasons, you need to change the ownership. You want to give ownership to Brenda Cassini (bcassini), the office manager, and you want to give group ownership to the hr group for all files in the directory. Once you do this, though, you have to reset group ownership on the /hr/personnel file to mgmt1. Task: Give bcassini ownership of the /hr directory and all of its contents. Give hr group ownership of the /hr directory and all of its contents. Return group ownership of the /hr/personnel file to mgmt1.
answer
Type: chown -R bcassini:hr /hr chgrp mgmt1 /hr/personnel
question
An assistant administrator has been modifying permissions on the /hr directory. You want to quickly change the permissions on /hr to match the permission settings documented in your company's security policy. Task: User = read, write, execute Group = read, execute Other = read, execute
answer
Type: chmod 755 /hr
question
A change in company policy requires users of the hr group to make changes to the files in the /hr directory. Task: Give the write group permission to the files in the /hr directory (in addition to any other permissions already given).
answer
Type: chmod g+w /hr/* ls -la /hr
question
The /hr directory is used by members of the Human Resources team to keep important employee documents. Over time, you notice that permissions set on each file have become inconsistent. You want to make sure that all files in the /hr directory have the same permissions set. Task: Configure permissions on all files in the /hr directory as follows: User and group owners should have read and write permissions to the files. The other group should have no permissions on any file.
answer
Type: chmod 660 /hr/* ls -la /hr
question
The Sales team uses the /sales directory to store documents related to sales, contacts, and orders. Currently, permissions on the directory only allow the user and group owners to view the contents of the directory. Users who are not part of the group owner are unable to list the contents of the directory. As part of a new company policy to increase teamwork, you want to allow all users to be able to see the /sales directory and list its contents. You also want to let all users open, but not change, any document inside that directory. Task: Allow the other group to browse the /sales directory. Modify permissions on all files in the /sales directory to allow members of the other group to view but not change the file.
answer
Type: chmod o+rx /sales chmod o+r /sales/*
question
You want to change your default umask to give yourself and members of the groups to which you belong full permissions to the files and directories you create. You want to deny permissions for everyone else. You are logged on as wadams. Task: Change your default umask value to give yourself and members of the groups to which you belong full permissions to the files and directories that you create.
answer
Type: umask 007
question
You have a Linux workstation that you use at home for browsing the Internet, playing music, and writing letters. When you run your MP3 player, it sometimes pauses in playback. You have heard that you might be able to alleviate the problem by raising the priority of the program. You decide to set the SUID bit to automatically run the program as root and thereby raise its priority. Task: Set the SUID bit for the /usr/bin/xmms program. Do not change any other permissions on the file.
answer
Type: chmod u+s /usr/bin/xmms chmod 4755 /usr/bin/xmms
question
You have a Linux workstation that you use at home. You are the only user of this computer. You want to improve security by removing the SUID and SGID from some files. Task: Remove the SUID from the following files: /usr/bin/gpasswd /usr/bin/newgrp Remove the SGID from the following files: /usr/bin/wall /usr/bin/write Do not change any other permissions on the files.
answer
Type: chmod u-s /usr/bin/gpasswd chmod u-s /usr/bin/newgrp chmod g-s /usr/bin/wall chmod g-s /usr/bin/write
question
Earlier in the day you created a user account for Brenda Cassini (bcasini). When she goes to log on, she can't. You realize that you misspelled her user name as bcasini. Task: Change the user account name from bcasini to bcassini. Change the home directory to /home/bcassini. You are logged on as wadams, so you will have to perform these tasks as the root user. The root password is 1worm4b8.
answer
Type: su- 1worm4b8 usermod -l bcassini bcasini usermod -d /home/bcassini bcassini
question
Your system administrator scheduled a system update that requires all machines to be running and all users to be logged out of the system. Task: Log out of the system, while leaving the system powered on.
answer
Type: logout
question
You share a number of files from your computer, and you've received a number of calls from users who say they can't connect to the files. You check your computer and find that the Ethernet cable is unplugged. You've plugged the Ethernet cable in, so now you need to start the network interface card. Task: Determine which network interface went down when it was unplugged. Start the network interface from the command line.
answer
Type: ip addr ifupenp2s1
question
You've experienced some network connectivity issues, and you suspect it may be one of the NICs in your computer. Task: Stop the enp2s1 NIC as the first step to try to isolate the problem.
answer
Type: ifdown enp2s1 ip addr
question
You are the administrator of a server and have root privileges. The IT Manager asked you to install the cups package to enable printing on the server. Use dnf to install cups. After the installation is complete, print the sales document in /home/wadams. Task Install the cups package Print the sales document in /home/wadams
answer
Type: dnf install cups lpr sales
question
The user bcassini sent a document called baby1 to the printer. The document is a large photo file that is taking up the printing resources. Jobs behind baby1 cannot print. Task: Find the baby1 print job job number. Delete the baby1 print job from the print queue.
answer
Type: lpq lprm 1
question
This system was moved from a location where it was connected to the 192.168.2.0 network. The new location is in the 172.22.0.0 network. The user in the new location has tried to change the network interface configuration to connect to the new network, but has not been able to get connected. Use the vi command line text editor to open the /etc/sysconfig/network-scripts/ifcfg-ens0 file and complete the following tasks: Assign to ens0 the last valid host IP address in the 172.22.0.0 network For the netmask setting, enter the standard Class B subnet mask For the broadcast address setting, enter the last address in the 172.22.0.0 network. For the gateway address setting, enter the first valid host IP address in the 172.22.0.0 network After saving the interface configuration file, down the ens0 network interface, then bring it up again to acquire the new configuration from the ifcfg file From the command line, add the gateway address to the routing table as the default gateway. Note: If you need to login to the system or do any tasks that require root user privileges, the root user's name is root and the password is 1worm4b8.
answer
Type: vi /etc/sysconfig/network-scripts/ifcfg-ens0 i Change IPADDR line to 172.22.255.254 Change NETMASK line to 255.255.0.0 Change BROADCAST line to 172.22.255.255 Change GATEWAY line to 172.22.0.1 esc :wq ip link set ens0 down ip lnk set ens0 up ip route add default via 172.22.0.1
question
You need to temporarily connect to a different network. You need to change the IP configuration manually for the ens0 network interface. You also need to add a new default gateway for this network so you can be routed to the Internet. Complete the following tasks in the Linux operating system from the Command Line Interface (CLI): From the command line, use the ip addr command with the necessary options to remove the 192.168.0.123 address with the 24 bit subnet mask and then add the IP address 172.22.1.71 with the 16 bit subnet mask for ens0. From the command line, use the ip route add command with the necessary options to set 172.22.0.1 as the default gateway. Note: If you need to login to the system or do any tasks that require root user privileges, the root user's name is root and the password is 1worm4b8.
answer
Type: ip addr del 192.168.0.123/24 dev ens0 ip addr add 172.22.1.71/16 dev ens0 ip route add default via 172.22.0.1