From 55844de41d8060eacf8d4b5f355bacb66e4bca30 Mon Sep 17 00:00:00 2001 From: sspencerwire Date: Thu, 15 Feb 2024 10:50:13 -0600 Subject: [PATCH] Questions please part 1 (#1772) * Labs formatting of questions with admonitions needs to be universally applied. Other corrections as necessary. * questions need to be universally entered as a "question" admonition. In re-examining these files, some were not. * also found some tabbed content and spacing in earlier labs that needed to be removed. * earlier labs had fenced code blocks not tagged too * Missed one. --- .../lab3-system_utilities.md | 358 ++++++++-------- .../lab5-networking.md | 241 ++++++----- .../lab6-user_and_group_management.md | 211 +++++----- .../lab7-software_management.md | 382 +++++++++--------- .../lab8-system_and_process_monitoring-I.md | 2 +- 5 files changed, 614 insertions(+), 580 deletions(-) diff --git a/docs/labs/systems_administration_I/lab3-system_utilities.md b/docs/labs/systems_administration_I/lab3-system_utilities.md index 0d4e9113dd..c3941d8cf0 100644 --- a/docs/labs/systems_administration_I/lab3-system_utilities.md +++ b/docs/labs/systems_administration_I/lab3-system_utilities.md @@ -22,7 +22,7 @@ Estimated time to complete this lab: 70 minutes The exercises in this lab cover the usage of some basic system utilities that users and administrators alike need to be familiar with. Most of the commands are used in navigating and manipulating the file system. The file system is made up of files and directories. -The exercises will cover the usage of –`pwd`, `cd`, `ls`, `rm`, `mv`, `ftp`, `cp`, `touch`, `mkdir`, `file`, and `cat` utilities. +The exercises will cover the usage of –`pwd`, `cd`, `ls`, `rm`, `mv`, `ftp`, `cp`, `touch`, `mkdir`, `file`, `cat`, `find`, and `locate` utilities. ## Exercise 1 @@ -35,8 +35,8 @@ The `cd` command stands for change directory. You will start these labs by chang 1. Log in to the computer as root 2. Change from your current directory to the /etc directory. - - ``` + + ```bash [root@localhost root]# cd /etc ``` @@ -49,9 +49,9 @@ The `cd` command stands for change directory. You will start these labs by chang [root@localhost local]# ``` - + !!! Question - + What has changed about your prompt? 5. Change back to root’s home directory @@ -59,25 +59,25 @@ The `cd` command stands for change directory. You will start these labs by chang ```bash [root@localhost local]# cd /root ``` - + 6. Change to the /usr/local/ directory again. Type: - ``` + ```bash [root@localhost root]# cd /usr/local ``` - + 7. To change to the parent directory of the local directory type “cd ..” ```bash [root@localhost local]# cd .. ``` - + !!! Question - + What is the parent directory of the /usr/local/ directory? -8. To quickly change back to root’s home directory type “cd” without any argument. - +8. To quickly change back to root’s home directory type “cd” without any argument. + ```bash [root@localhost usr]# cd @@ -93,27 +93,27 @@ The `pwd` command stands for “present working directory”. It shows the locat #### To use `pwd` 1. To find out your current working directory type: - + ```bash [root@localhost root]# pwd /root ``` -2. Change your directory to the /usr/local/ directory using the “cd” command: - +2. Change your directory to the /usr/local/ directory using the “cd” command: + ```bash [root@localhost root]# cd /usr/local ``` 3. Use `pwd` to find your present working directory: - + ```bash [root@localhost local]# pwd /usr/local ``` 4. Return to root’s home directory: - + ```bash [root@localhost root]# cd ``` @@ -127,33 +127,35 @@ The `mkdir` command is used to create directories. You will create two directori #### To use `mkdir` 1. Type: - + ```bash [root@localhost root]# mkdir folder1 ``` 2. Create a second directory called folder2 - + ```bash [root@localhost root]# mkdir folder2 ``` -3. Now change your working directory to the “folder1” directory you created above. - +3. Now change your working directory to the “folder1” directory you created above. + ```bash [root@localhost root]# cd folder1 ``` 4. Display your current working directory. - + ```bash [root@localhost folder1]# pwd /root/folder1 ``` -5. Without leaving your present directory, change to the “folder2” directory. What is the command to do this? + !!! question + + Without leaving your present directory, change to the “folder2” directory. What is the command to do this? -6. Return to root’s home directory. +5. Return to root’s home directory. ## Exercise 4 @@ -164,13 +166,13 @@ The `touch` command can be used to create ordinary files. You will create “ fi #### To use `touch` 1. Change directory i.e. `cd` to folder1 and create "file11:" - + ```bash [root@localhost folder1]# touch file11 ``` 2. While still in folder1 create "file12:" - + ```bash [root@localhost folder1]# touch file12 ``` @@ -194,19 +196,19 @@ The `ls` command stands for list. It lists the contents of a directory. #### To use `ls` 1. Type `ls` in root’s home directory: - + ```bash [root@localhost root]# ls ``` - - !!! Question - + + !!! Question + List the contents of the directory 2. Change to the "folder1" directory 3. List the contents of “folder1” directory. Type `ls` - + ```bash [root@localhost folder1]# ls file11 file12 @@ -215,7 +217,7 @@ The `ls` command stands for list. It lists the contents of a directory. 4. Change to the "folder2" directory and list its contents here: 5. Change back to your home directory and list “all” the hidden files and folders: - + ```bash [root@localhost folder2]# cd @@ -224,7 +226,7 @@ The `ls` command stands for list. It lists the contents of a directory. ``` 6. To obtain a long or detailed list of all the files and folders in your home directory type: - + ```bash [root@localhost root]# ls –al total 44 @@ -257,7 +259,7 @@ The `mv` command stands for move. It renames files or directories. It can also m #### To use `mv` 1. Change directory to the "folder1" directory and list its contents: - + ```bash [root@localhost root]# cd folder1 [root@localhost folder1] ls @@ -266,7 +268,7 @@ The `mv` command stands for move. It renames files or directories. It can also m ``` 2. You will rename file11 and file12 in the "folder1" directory to temp_file11 and temp_file12 respectively: - + ```bash [root@localhost folder1]# mv file11 temp_file11 ``` @@ -276,32 +278,35 @@ The `mv` command stands for move. It renames files or directories. It can also m ```bash [root@localhost folder1]# ls ``` - + !!! Question - + Write down the contents: 4. Rename the file12 to temp_file12: - + ```bash [root@localhost folder1]# mv file12 temp_file12 ``` - + 5. Without changing directory rename the file21 and file22 in "folder2" to temp_file21 and temp_file22 respectively: - + ```bash [root@localhost folder1]# mv /root/folder2/file21 /root/folder2/temp_file21 [root@localhost folder1]# mv /root/folder2/file22 /root/folder2/temp_file22 ``` -6. Without changing your current directory list the contents of folder2. What is the command to do this? Also list the output of the command? +6. Without changing your current directory list the contents of folder2. + + !!! question + + What is the command to do this? Also list the output of the command? ## Exercise 7 ### `cp` - The `cp` command stands for copy. It makes copies of files or directories. 1. Change your directory to the "folder2" directory. @@ -319,7 +324,7 @@ The `cp` command stands for copy. It makes copies of files or directories. temp_file11 temp_file12 temp_file21 temp_file22 ``` -4. List the contents of folder2. Note that the original copies of temp_file21 and temp_file22 remain in folder2. +4. List the contents of folder2. Note that the original copies of temp_file21 and temp_file22 remain in folder2. ```bash [root@localhost folder2]# ls @@ -337,7 +342,7 @@ The `file` utility is used to determine file or directory types. 1. Change back to your home directory. 2. To see if "folder1" is a file or directory; type: - + ```bash [root@localhost root]# file folder1 folder1: directory @@ -346,7 +351,7 @@ The `file` utility is used to determine file or directory types. 3. Change to the folder1 directory 4. Use the `file` utility to determine the file type for temp_file11: - + ```bash [root@localhost folder1]# file temp_file11 temp_file11: empty @@ -355,21 +360,21 @@ The `file` utility is used to determine file or directory types. 5. Use the `file` utility to find out the file type for all the files in the folder1 directory. List here: 6. Change directory to the /etc directory: - + ```bash [root@localhost folder1]# cd /etc ``` 7. Use the `file` utility to find out the file type for the "passwd" file. - + ```bash [root@localhost etc]# file passwd ``` - + !!! Question - + What type of file is it? - + ## Exercise 9 ### `cat` @@ -381,42 +386,42 @@ The `cat` command is short for concatenate, meaning it strings files together. T 1. Change directory to the /root/folder1 directory 2. Create a new text file called “first.txt” - + ```bash [root@localhost folder1]# cat > first.txt ``` -3. Type in the phrase below at the blank prompt and press ENTER. - +3. Type in the phrase below at the blank prompt and press ++enter++. + ```bash This is a line from first.txt !! ``` -4. Press the CTRL+c simultaneously. - +4. Press the ++ctrl+c++ simultaneously. + 5. Type “cat first.txt” to read the text you just typed in: - + ```bash [root@localhost folder1]# cat first.txt This is a line from first.txt !! ``` 6. Create another file called “second.txt” using `cat`. Type the following text into the file – “This is a line from second.txt !!” - + !!! Question - + What is the command to do this? #### To use `cat` to concatenate files together -1. You will concatenate the files “first.txt” and “second.txt”. Type: - +1. You will concatenate the files “first.txt” and “second.txt”. Type: + ```bash [root@localhost folder1]# cat first.txt second.txt ``` - + !!! Question - + What is your output? ## Exercise 10 @@ -429,8 +434,8 @@ In this exercise you will learn how to log on anonymously to an FTP server and d !!! note - You'll need to have completed the exercises in a previous lab to be able to follow along in this particular exercise that needs an available FTP server running somewhere reachable. - + You will need to have completed the exercises in a previous lab to be able to follow along in this particular exercise that needs an available FTP server running somewhere reachable. + #### To use `ftp` 1. Log on to your machine as root @@ -444,7 +449,7 @@ In this exercise you will learn how to log on anonymously to an FTP server and d What is the command to do this? 4. Change directory to the newly created “downloads” directory - + ```bash [root@localhost src]# cd downloads ``` @@ -457,7 +462,7 @@ In this exercise you will learn how to log on anonymously to an FTP server and d ``` 6. To connect to the FTP server type: - + ```bash ftp> open < server-address> (Obtain the from your instructor) ……… @@ -467,13 +472,13 @@ In this exercise you will learn how to log on anonymously to an FTP server and d ``` 7. Log in as an anonymous user. Type “anonymous” at the prompt: - + ```bash Name (10.4.51.29:root): anonymous ``` -8. Type in any e-mail address at the password prompt and press enter - +8. Type in any e-mail address at the password prompt and press enter + ```bash Password: *************** @@ -491,13 +496,13 @@ In this exercise you will learn how to log on anonymously to an FTP server and d ```bash ftp> binary ``` - + !!! Question - + What is the output of the binary command and what is binary mode "binary mode"? 10. List the current directories on the ftp server. Type “ls” at the ftp prompt (ftp>): - + ```bash ftp> ls 227 Entering Passive Mode (10,0,4,5,16,103). @@ -508,19 +513,19 @@ In this exercise you will learn how to log on anonymously to an FTP server and d ``` 11. Change directory to the “pub” directory. Type: - + ```bash ftp> cd pub ``` 12. Use the “ls” command to list the files and directories in the “pub” directory - + !!! Question - + How many files and directories are in there now? -13. Download the file called “hello-2.1.1.tar.gz” to your local directory. Type “yes” at the prompt. - +13. Download the file called “hello-2.1.1.tar.gz” to your local directory. Type “yes” at the prompt. + ```bash ftp> mget hello-2.1.1.tar.gz mget hello-2.1.1.tar.gz? yes @@ -535,14 +540,18 @@ In this exercise you will learn how to log on anonymously to an FTP server and d ``` 14. Log off the FTP server and exit your `ftp` client. Type: - + ```bash ftp> bye ``` 15. You will be thrown back into your local shell. -16. Ensure you are still in the local machine's “downloads” directory on your local machine. List the files in the downloads folder? +16. Ensure you are still in the local machine's “downloads” directory on your local machine. + + !!! question + + List the files in the downloads folder. ## Exercise 11 @@ -557,35 +566,39 @@ Every program started on a Linux system has three open file descriptors, stdin ( 1. Ensure you are still in the folder1 directory. 2. You will use output redirection to redirect the out of a the ls (list) command to a text file called myredirects: - + ```bash [root@localhost folder1]# ls > myredirects ``` 3. Examine the contents of the new file (myredirects) created in the folder1 directory. - + ```bash [root@localhost folder1] # cat myredirects temp_file11 temp_file12 temp_file21 temp_file22 myredirects ``` 4. Now you will redirect the output of the file command into that same file. You want to find out the file type for the temp_file11 in the folder1 directory and send the output to your myredirects file: - + ```bash [root@localhost folder1]# file temp_file11 > myredirects ``` -5. Examine the contents of the myredirects file. It has changed what happened? +5. Examine the contents of the myredirects file. + + !!! question + + It has changed. What happened? 6. If you want to prevent what happened above from happening you will use the double redirection symbol “>>”. This will append (add) the new output to the file instead of replacing it. Try it: - + ```bash [root@localhost folder1]# ls >> myredirects ``` -7. Now examine the contents of the file myredirects again using `cat`. +7. Now examine the contents of the file myredirects again using `cat`. - !!! Question + !!! Question Write down its contents here: @@ -612,87 +625,91 @@ Use the guidelines below: ``` 1. Ensure you are still in the folder1 directory. Use the long listing option of the ls command on temp_file11: - + ```bash [root@localhost folder1]# ls –l temp_file11 -rw-r--r-- 1 root root 0 Jul 26 18:26 temp_file11 ``` 2. You will redirect the output of the same command above (ls –l temp_file11) to the null device. - + ```bash [root@localhost folder1]# ls –l temp_file11 > /dev/null ``` - + You should have no output. 3. Now if you accidentally mis-spell the name of the file whose information you want to see; You will get: - + ```bash [root@localhost folder1]# ls –l te_file1 ls: te_file1: No such file or directory ``` - + The above is the result of the type of error the `ls` command was programmed to give. 4. Run the same command as the above with an incorrect spelling of the file name and redirect it to /dev/null - + ```bash [root@localhost folder1]# ls -l te_file1 > /dev/null ls: te_file1: No such file or directory ``` - - !!! Question - + + !!! Question + What happened here? How come the output still showed up on the screen (stdout)? -5. For various reasons you may want to suppress error message such as the one above. To do this type: +5. For various reasons you may want to suppress error message such as the one above. To do this type: ```bash [root@localhost folder1]# ls –l te_file1 > /dev/null 2>&1 ``` - + You will not get any output. - + This time the standard output as well as the standard error is suppressed. - + The order of redirection is IMPORTANT!! - + Redirection is read from left to right on the command line. The left-most part of the redirection symbol - “>”: will send the standard output (stdout) to /dev/null. Then the right-most part of the redirection - “2>&1 “: will duplicate the standard error (2) to the standard output (1). - + Hence the above command can be read as: redirect stdout(1) to “/dev/null” and then copy stderr (2) to stdout - + 6. To further demonstrate the importance of the order of redirection; Try: - + ```bash [root@localhost folder1]# ls –l tem_file 2>&1 > order.txt ``` - + Use the `cat` command to examine the contents of the file “order.txt” - + The left-most part – “2>&1” will copy the standard error to the standard output. Then, the right-most part of the above – “ > order.txt” redirects stdout to the file order.txt. 7. Try this variation of the above step: - + ```bash [root@localhost folder1]# ls –l hgh_ghz 2> order2.txt > order2.txt ``` - - Examine the file “order2.txt” and explain what happened? - + + !!! question + + Examine the file “order2.txt” and explain what happened? + 8. To send the standard output and standard error to separate files; Type: - + ```bash [root@localhost folder1]# ls –l tep_f > standard_out 2> standard_err ``` - - Two new files were created. What are the names of the files and what are their contents? - + + !!! question + + Two new files were created. What are the names of the files and what are their contents? + 9. You can similarly redirect both stdout and stderr to the same file by using: - + ```bash [root@localhost folder1]# ls –l te_fil &> standard_both ``` @@ -709,7 +726,7 @@ The `rm` command is used to delete files or directories. You are going to use `r ```bash [root@localhost folder1]# rm standard_err - rm: remove `standard_err'? y + rm: remove `standard_err'? y ``` 2. Delete the “standard_out” file. To prevent being prompted for confirmation before deleting a file use the “–f “ option with the `rm` command: @@ -719,7 +736,7 @@ The `rm` command is used to delete files or directories. You are going to use `r ``` 3. Change back to your home directory (/root) and delete the “folder2” directory. To use `rm` to delete a folder you need to use the “–r” switch: - + ```bash [root@localhost root]# rm -r folder2 @@ -731,9 +748,9 @@ The `rm` command is used to delete files or directories. You are going to use `r rm: remove directory `folder2'? y ``` - - !!! Question - + + !!! Question + You were again prompted to confirm the removal of each file in the directory and the directory itself. What option will you use with the `rm –r` command to prevent this? ## Exercise 13 @@ -751,16 +768,16 @@ Please take the time to go through the online `vi` (more precisely `vim`) tutori #### To learn `vi` 1. While logged into the system, type: - + [root@localhost root]# vimtutor - + ## Exercise 14 ### Searching for files: (`find` and `locate`) This exercise will discuss two of the most popular utilities used for searching for files and directories on the file system. They are the `find` command and the `locate` commands. -**find** +#### `find` The `find` utility has been around for along time. It recursively scans directories to find files that match a given criterion. @@ -772,26 +789,26 @@ find [path] [options] [criterion] [action] If you do not specify any directory or path, find will search the current directory. If you do not specify a criterion, this is equivalent to "true", thus all files will be found. The `find` utility has many options for doing just about any type of search for a file. Only a few of the options, criteria and actions are listed below. -``` +```bash OPTIONS: --xdev: do not search on directories located on other filesystems; +-xdev: do not search on directories located on other filesystems; --mindepth : descend at least levels below the specified directory before +-mindepth descend at least levels below the specified directory before searching for files; --maxdepth : search for files located at most n levels below the specified directory; +-maxdepth : search for files located at most n levels below the specified directory; --follow: follow symbolic links if they link to directories. +-follow: follow symbolic links if they link to directories. --daystart: when using tests related to time (see below), take the beginning of current day as a timestamp instead of the default (24 hours before current time). +-daystart: when using tests related to time (see below), take the beginning of current day as a timestamp instead of the default (24 hours before current time). ``` -``` +```bash CRITERION --type : search for a given type of file; can be one of: f (regular file), d (directory), +-type : search for a given type of file; can be one of: f (regular file), d (directory), l (symbolic link), s (socket), b (block mode file), c (character mode file) or @@ -807,21 +824,21 @@ p (named pipe); -ctime , -cmin , -cnewer : same as for -atime, -amin and -anewer, but applies to the last time when the contents of the file have been modified; --regex : same as -name, but pattern is treated as a regular expression; +-regex : same as -name, but pattern is treated as a regular expression; --iregex : same as -regex, but ignore case. +-iregex : same as -regex, but ignore case. ``` -``` +```bash ACTION: --print: just prints the name of each file on standard output. This is the default action; +-print: just prints the name of each file on standard output. This is the default action; -ls: prints on the standard output the equivalent of ls -ilds for each file found; --exec : execute command on each file found. The command line must end with a ;, which you must escape so that the shell does not interpret it; the file position is marked with {}. +-exec : execute command on each file found. The command line must end with a ;, which you must escape so that the shell does not interpret it; the file position is marked with {}. --ok : same as -exec but ask confirmation for each command. +-ok : same as -exec but ask confirmation for each command. ``` #### To use `find` @@ -852,13 +869,13 @@ ACTION: ………… ``` - + Your output shows the default behavior of find when used without any option. - + It displays all the files and directories (including hidden files) in the working directory recursively. - -3. Now use `find` to find only the directories in your pwd. Type: - + +3. Now use `find` to find only the directories in your pwd. Type: + ```bash [root@localhost root]# find -type d . @@ -866,13 +883,13 @@ ACTION: ./folder2 ……… ``` - - !!! Questions - + + !!! Question "Questions" + From the above command “find –type d”; what is the “option”, what is the “path”, what is the “criterion” and finally what is the “action”? 4. Next you will search for all the files on your system that end with the suffix “.txt”: - + ```bash [root@localhost root]# find / -maxdepth 3 -name "*.txt" -print /root/folder1/first.txt @@ -880,31 +897,30 @@ ACTION: /root/folder1/order.txt /root/folder1/order2.txt ``` - - !!! Question - - Again from the above command; what is the “option”, what is the “path”, what is the “criterion” and finally what is the “action”? (HINT: The action = “- print”) - + !!! Question "Questions" + + Again from the above command, what is the “option”, what is the “path”, what is the “criterion” and finally what is the “action”? (HINT: The action = “- print”) + The search will only be performed 3 directories deep from the “/” directory. - + The asterisk used in the command above is one of the “wild card” characters in Linux. - + The use of wild-cards in Linux is called “globbing”. 5. Use the `find` command to find all files in your “pwd” that are “smaller” than 200 kilobytes in size. Type: - + ```bash [root@localhost root]# find . –size -200k ``` 6. Use the `find` command to find all the find all the files in your pwd that are “larger” than 10 kilobytes and display their “file type” as well. Type: - + ```bash [root@localhost root]# find . –size +10k –exec file "{ }" ";" ``` -### `locate` +#### `locate` The syntax for the `find` command can be rather difficult to use sometimes; and because of its extensive search, it can be slow. An alternative command is `locate`. @@ -915,32 +931,32 @@ It relies on the `updatedb` program. ```bash search usage: -locate [-qi] [-d ] [--database=] ... +locate [-qi] [-d ] [--database=] ... -locate [-r ] [--regexp=] +locate [-r ] [--regexp=] -database usage: locate [-qv] [-o ] [--output=] +database usage: locate [-qv] [-o ] [--output=] locate [-e ] [-f ] [-l ] [-c] <[-U ] [-u]> -general usage: locate [-Vh] [--version] [--help] +general usage: locate [-Vh] [--version] [--help] ``` #### To use `locate` 1. Change to the folder1 directory and create empty files temp1, temp2 and temp3: - + ```bash [root@localhost root]# cd folder1; touch temp1 temp2 temp3 [root@localhost folder1]# ``` - + The semi-colon (;) used in the command above, allows you issue multiple commands on a single line!! -2. Use `locate` to search for all the files in your pwd that have the suffix “temp” - +2. Use `locate` to search for all the files in your pwd that have the suffix “temp” + ```bash [root@localhost folder1]# locate temp* /root/folder1/temp_file11 @@ -948,23 +964,23 @@ general usage: locate [-Vh] [--version] [--help] /root/folder1/temp_file21 /root/folder1/temp_file22 ``` - + Note that the three files you created in step 1 were NOT found. -3. You will force an update of the database using `updatedb` to enable it take cognizance of all newly created files. Type: - +3. You will force an update of the database using `updatedb` to enable it take cognizance of all newly created files. Type: + ```bash [root@localhost folder1]# updatedb ``` -4. Now try the search again. Type: - +4. Now try the search again. Type: + ```bash [root@localhost folder1]# locate temp ``` - - !!! Question - + + !!! Question + What happened this time? 5. All done with Lab 3. diff --git a/docs/labs/systems_administration_I/lab5-networking.md b/docs/labs/systems_administration_I/lab5-networking.md index 88ab02e204..b9e9dc6cc3 100644 --- a/docs/labs/systems_administration_I/lab5-networking.md +++ b/docs/labs/systems_administration_I/lab5-networking.md @@ -20,13 +20,12 @@ After completing this lab, you will be able to: - Create virtual network devices - Manage network devices and settings on a Linux system using the `iproute2` (`ip`) toolkit -- Manage network devices and settings on a Linux system using NetworkManager (`nmcli`) toolkit +- Manage network devices and settings on a Linux system using NetworkManager (`nmcli`) toolkit - Troubleshoot common network issues Estimated time to complete this lab: 60 minutes - -## Overview +## Overview This Networking Essentials lab covers various network configuration and troubleshooting exercises on a Linux server. You will be better equipped to manage and troubleshoot network settings using common networking utilities readily available on Linux based systems. @@ -34,46 +33,46 @@ This Networking Essentials lab covers various network configuration and troubles ### Change Hostname -There are many methods for identifying or referring to computers. Some of these methods guarantee uniqueness [ especially on a network], and others don't. A computer hostname can be regarded as a human-friendly name. Computer hostnames should ideally be unique depending on how they are managed and assigned. But because anyone with the Administrative privileges on a system can unilaterally assign whatever hostname they want to the system - uniqueness is not always guaranteed. +There are many methods for identifying or referring to computers. Some of these methods guarantee uniqueness [ especially on a network], and others don't. A computer hostname can be regarded as a human-friendly name. Computer hostnames should ideally be unique depending on how they are managed and assigned. But because anyone with the Administrative privileges on a system can unilaterally assign whatever hostname they want to the system - uniqueness is not always guaranteed. This first exercise walks through some common tools for managing the computer hostname. - #### To change the system's hostname - 1. While logged into your system, view the current *hostname*, using the popular `hostname` utility. Type: ```bash hostname ``` -2. Run the `hostname` utility again with a different option to view the server's FQDN: +2. Run the `hostname` utility again with a different option to view the server's FQDN: ```bash hostname --fqdn ``` !!! Question - + What does FQDN stand for? And why is the result of your server plain server hostname different from its FQDN? - + 3. Use the `hostnamectl` utility to view the current *hostnames*. Type: ```bash hostnamectl ``` - That's a lot of extra information! + + That's a lot of extra information! 4. Add the `--static` option to the `hostnamectl` command to view the static hostname for your server. Type: ```bash hostnamectl --static ``` + 5. Add the `--transient` option to the `hostnamectl` command to view the transient hostname for your server. - + 6. Now try the `--pretty` option to the `hostnamectl` command to view the pretty hostname for your server. - + 7. Set a new transient hostname for your server. Type: ```bash @@ -85,6 +84,7 @@ This first exercise walks through some common tools for managing the computer ho ```bash hostnamectl --transient ``` + 9. Set a new static hostname for your server. Type: ```bash @@ -92,40 +92,39 @@ This first exercise walks through some common tools for managing the computer ho ``` 10. Verify the static hostname change. - + !!! Question Consult the man page for `hostnamectl`. What are the differences between pretty, transient and static hostnames? - + ## Exercise 2 The first critical step you need to complete before going on to the other exercises in this network lab will be creating a special virtual network interface known as a MACVTAP device. -MACVTAP devices are virtual devices that combine the properties of a softwarei-only interface known as a TAP device as well as the properties of the MACVLAN driver. +MACVTAP devices are virtual devices that combine the properties of a softwarei-only interface known as a TAP device as well as the properties of the MACVLAN driver. Creating and working with these MACVTAP devices will allow you to safely test, change, and configure various network configuration-related tasks. These virtual network interfaces will be used in various exercises without disrupting the existing network configuration. +!!! tip -!!! TIP - TAP devices provide a software-only interface that user-space applications can easily access. TAP devices send and receive raw Ethernet frames. MACVLAN is used for creating virtual network interfaces that attach to physical network interfaces. The MACVTAP devices have their own unique MAC address distinct from the MAC address of the underlying physical network card they are associated with. - + ### Create MACVTAP Interfaces This exercise starts with creating needed MACVTAP virtual network interfaces. This will allow you to safely test, change, and configure various network configuration related tasks. These virtual network interfaces will be used in various exercises without disrupting the existing network configuration. - #### To list all network interfaces on the system 1. Ensure you are logged into the server. - + 2. Use the `ip` program to view the existing network interfaces on your system. Type: ```bash ip link show ``` + 3. Try using the `nmcli` command to list all the network devices. Type: ```bash @@ -149,11 +148,10 @@ This exercise starts with creating needed MACVTAP virtual network interfaces. Th eno2 ``` + The output on the sample demo system shows one suitable interface named eno2. - -3. Run the command to identify the device again but this time store the returned value in a - variable named $DEVICE1. Double check the value of $DEVICE1 using echo. - Type the following 2 separate commands to accomplish this: + +3. Run the command to identify the device again but this time store the returned value in a variable named $DEVICE1. Double check the value of $DEVICE1 using echo. Type the following 2 separate commands to accomplish this: ```bash # DEVICE1=$(ls -l /sys/class/net/ | grep -v 'virtual\|total' | tail -n 1 | awk '{print $9}') @@ -162,7 +160,7 @@ This exercise starts with creating needed MACVTAP virtual network interfaces. Th ``` 4. Now, create a MACVTAP interface named - `macvtap1`. The new interface will be associated with - $DEVICE1. Type: + $DEVICE1. Type: ```bash ip link add link $DEVICE1 name macvtap1 type macvtap mode bridge @@ -174,7 +172,7 @@ This exercise starts with creating needed MACVTAP virtual network interfaces. Th ip --brief link show macvtap1 ``` - Note the DOWN state of the `macvtap` interface in the output. + Note the DOWN state of the `macvtap` interface in the output. 6. View detailed information about all the MACVTAP-type network devices on the system. Type: @@ -207,15 +205,14 @@ This exercise starts with creating needed MACVTAP virtual network interfaces. Th ``` !!! TIP - + If you ever need to disable a network interface, the syntax for `ip` command to do this is `ip link set down`. For example to disable a network interface named `macvtap7`, you would run: ```bash ip link set macvtap7 down ``` - -Now that you have set up the `macvtap` interfaces, you safely perform the various network configuration and troubleshooting tasks in the remaining exercises. +Now that you have set up the `macvtap` interfaces, you safely perform the various network configuration and troubleshooting tasks in the remaining exercises. ## Exercise 3 @@ -224,12 +221,13 @@ Now that you have set up the `macvtap` interfaces, you safely perform the variou #### To set an IP addresses on a network interface 1. View the IP addresses for all network interfaces on your server. Type: - + ```bash ip address show ``` + 2. Assign the IP address - 172.16.99.100 - to `macvtap1`. Type - + ```bash ip address add 172.16.99.100/24 dev macvtap1 ``` @@ -239,6 +237,7 @@ Now that you have set up the `macvtap` interfaces, you safely perform the variou ```bash ip address show macvtap1 ``` + 4. Use the `nmcli` command to view the IPv4 addresses for all interfaces on your system. Type: ```bash @@ -265,16 +264,16 @@ Now that you have set up the `macvtap` interfaces, you safely perform the variou 3. Verify the IPv6 address assignments, type: - ```bash + ```bash ip --brief -6 address show macvtap1 && ip -br -6 address show macvtap1 ``` - + 4. Use `nmcli` to view the IPv6 addresses for all interfaces on your system. Type: ```bash nmcli --get-values IP6.ADDRESS,GENERAL.DEVICE device show ``` - + ## Exercise 5 ### Routing management @@ -282,70 +281,71 @@ Now that you have set up the `macvtap` interfaces, you safely perform the variou #### To view the system's routing table 1. Display the current routing table for the system. Type: - + ```bash ip route show default via 192.168.2.1 dev enp1s0 proto dhcp src 192.168.2.121 metric 100 10.99.99.0/24 dev tunA proto kernel scope link src 10.99.99.1 metric 450 linkdown 192.168.2.0/24 dev enp1s0 proto kernel scope link src 192.168.2.121 metric 100 ``` + 2. Using one of the networks displayed in the leftmost column of the previous command's output as the argument, display the route table entry for that network. For example to show the kernel route table entry for the 10.99.99.0/24 network, type: - + ```bash ip route show 10.99.99.0/24 ``` - + 3. Query the system to see the route that will be used to get to an example arbitrary destination. For example to view the routing details for getting to the destination IP address 8.8.8.8, type: - + ```bash ip route get 8.8.8.8 8.8.8.8 via 192.168.2.1 dev enp1s0 src 192.168.2.121 uid 0 cache ``` - + Here is a breakdown of the output in plain-speak: - - * Destination IP Address: 8.8.8.8 is the IP address that we are trying to reach - * Via: 192.168.2.1 is the next hop IP address that the packet will be sent to reach the destination - * Device: `enp1s0` is the network interface that will be used to send the packet - * Source IP Address: 192.168.2.121 is the IP address of the network interface that will be used as the source address for the packet - * UID: 0 is the user ID of the process that initiated this command - * Cache: This field indicates whether this route is cached in the kernel’s routing table -4. Now view how the system will route a packet from one IP to another destination IP address. Type: - + - Destination IP Address: 8.8.8.8 is the IP address that we are trying to reach + - Via: 192.168.2.1 is the next hop IP address that the packet will be sent to reach the destination + - Device: `enp1s0` is the network interface that will be used to send the packet + - Source IP Address: 192.168.2.121 is the IP address of the network interface that will be used as the source address for the packet + - UID: 0 is the user ID of the process that initiated this command + - Cache: This field indicates whether this route is cached in the kernel’s routing table + +4. Now view how the system will route a packet from one IP to another destination IP address. Type: + ```bash ip route get from 192.168.1.1 to 192.168.1.2 local 192.168.1.2 from 192.168.1.1 dev lo uid 0 cache ``` - + ### Set Default Gateway #### To configure a default gateway for the system 1. Use `ip` to query for and list the current default gateway on your system. Type: - + ```bash ip route show default ``` - + 2. Set a default gateway via the `macvtap1` interface. Type: - + ```bash ip route add default via 192.168.1.1 ``` 3. Verify the new default gateway configuration - + ```bash ip route show default ``` - + ### Add Static Route #### To add a static route to the routing table @@ -354,13 +354,14 @@ Now that you have set up the `macvtap` interfaces, you safely perform the variou ```bash ip route add 172.16.0.0/16 via 192.168.1.2 - ``` + ``` + 2. Verify the addition of the static route by running: ```bash ip route show 172.16.0.0/16 ``` - + ### Delete Static Route #### To Remove a static route from the routing table @@ -370,13 +371,13 @@ Now that you have set up the `macvtap` interfaces, you safely perform the variou ```bash ip route del 10.0.0.0/24 via 192.168.1.2 ``` - + 2. Verify the removal of the static route - + ```bash ip route show ``` - + ## Exercise 6 ### Deleting IP addresses @@ -388,17 +389,17 @@ This exercise walks through how to delete configured IP (IPv4 and IPv6) addresse #### To remove an assigned IP address from a network interface 1. Delete the IP address on `macvtap1`. Type: - + ```bash ip address del 172.16.99.100/24 dev macvtap1 ``` - + 2. Verify the removal of the IP address by running: - + ```bash ip address show macvtap1 ``` - + ### Delete IPv6 Address #### To remove an assigned IPv6 address from a network interface @@ -408,13 +409,13 @@ This exercise walks through how to delete configured IP (IPv4 and IPv6) addresse ```bash ip -6 address del 2001:db8::1/64 dev macvtap1 ``` - + 2. Verify the removal of the IPv6 address with: - + ```bash ip -6 address show macvtap1 ``` - + ## Exercise 7 ### Configure Network Interfaces via `nmcli` @@ -422,82 +423,82 @@ This exercise walks through how to delete configured IP (IPv4 and IPv6) addresse This exercise shows how to configure network interfaces using the NetworkManager tooling. !!! Note - + By default, any network configuration changes done using `nmcli` (NetworkManager) will persist between system reboots. This is in contrast to the configuration changes that are done with the `ip` utility. -#### To create a `macvtap` interface using `nmcli` +#### To create a `macvtap` interface using `nmcli` 1. Start by listing all available network devices by running: ```bash nmcli device ``` - + 2. Next, identify an underlying network device with which to associate the new MACVTAP interface. Save the value of the identified device in the variable $DEVICE2. Type: - + ```bash DEVICE2=$(ls -l /sys/class/net/ | grep -v 'virtual\|total' | tail -n 1 | awk '{print $9}') ``` - -3. Now, create a new NetworkManager connection called `macvtap2` and an associated MACVTAP interface named - `macvtap2`. The new interface will be associated with $DEVICE2. Type: - + +3. Now, create a new NetworkManager connection called `macvtap2` and an associated MACVTAP interface named - `macvtap2`. The new interface will be associated with $DEVICE2. Type: + ```bash nmcli con add con-name macvtap2 type macvlan mode bridge tap yes dev $DEVICE2 ifname macvtap2 ``` - + 4. Use `nmcli` to verify the creation of `macvtap2` interface. Type: - + ```bash nmcli device show macvtap2 ``` - + 5. Use `nmcli` to verify the creation of `macvtap2` connection. Type: - + ```bash nmcli connection show macvtap2 ``` - + 6. Similarly use `ip` to verify the creation of `macvtap2` interface. Type: - + ```bash ip --brief link show macvtap2 ``` - + Note the output's UP state of the `macvtap` interface. - + !!! Question - + What is the difference between the concept of a connection and that of a device in NetworkManager? - + #### To modify interface network configuration with `nmcli` 1. Start by querying for the IPv4 address for the new `macvtap2` interface by running: - + ```bash nmcli -f ipv4.addresses con show macvtap2 ``` - + The value of the ipv4.addresses property should be empty. - + 2. Configure the `macvtap2` connection with these settings: - + - IPv4 Method = manual - IPv4 Addresses = 172.16.99.200/24 - - Gateway = 172.16.99.1 + - Gateway = 172.16.99.1 - DNS Servers = 8.8.8.8 and 8.8.4.4 - DNS Search domain = example.com - + Type: - + ```bash nmcli connection modify macvtap2 ipv4.method manual \ ipv4.addresses 172.16.99.200/24 ipv4.gateway 172.16.99.1 \ ipv4.dns 8.8.8.8,8.8.4.4 ipv4.dns-search example.com ``` - + 3. Verify the new IPv4 address setting by running: - + ```bash nmcli -f ipv4.addresses con show macvtap2 ``` @@ -507,39 +508,39 @@ This exercise shows how to configure network interfaces using the NetworkManager ```bash nmcli -f ipv4.addresses,IP4.ADDRESS con show macvtap2 ``` - + !!! Question - - What is the difference between these NetworkManager properties - ipv4.addresses and IP4.ADDRESS - + + What is the difference between these NetworkManager properties - ipv4.addresses and IP4.ADDRESS? + 5. Check the changes to the network connection using the `ip` command. Type: - + ```bash ip -br address show dev macvtap2 ``` - + 6. To properly apply the new settings and make them the new runtime values, use `nmcli` to first toggle the connection down (i.e. deactivate it). Type: - + ```bash nmcli connection down macvtap2 Connection macvtap2 successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/5) ``` - + 7. Now activate the new connection to apply the new settings. Type: - + ```bash nmcli connection up macvtap2 Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/6) ``` - + 8. View the final setting using the ip utility. Type: - + ```bash ip -br address show dev macvtap2 ``` - + ## Exercise 8 ### Configure DNS Servers @@ -547,17 +548,17 @@ This exercise shows how to configure network interfaces using the NetworkManager #### To set DNS server addresses for the system 1. Configure DNS servers for `macvtap1` - + ```bash nmcli con mod macvtap1 ipv4.dns 8.8.8.8, 8.8.4.4 ``` - + 2. Verify the DNS server configuration - + ```bash nmcli con show macvtap1 | grep DNS ``` - + ## Exercise 9 ### Troubleshoot network issues @@ -565,29 +566,27 @@ This exercise shows how to configure network interfaces using the NetworkManager #### To Identify and troubleshoot common network issues 1. Check the status of network interfaces - + ```bash ip link show ``` - + 2. Test network connectivity to a remote host (e.g., google.com) - + ```bash ping google.com ``` - + 3. Try pinging the local gateway. Type: - - ``` + + ```bash ping _gateway ``` !!! Question - Through what mechanism is your system able to correctly resolve the name `_gateway` to the proper IP address for - your locally configured default gateway? + Through what mechanism is your system able to correctly resolve the name `_gateway` to the proper IP address for your locally configured default gateway? - ### View Active Connections #### To List all active network connections @@ -607,14 +606,14 @@ This exercise shows how to configure network interfaces using the NetworkManager ```bash tcpdump -i macvtap1 ``` - - Analyze captured packets and observe network activity. You can stop the packet capture when done by pressing (Ctrl + C) - + + Analyze captured packets and observe network activity. You can stop the packet capture when done by pressing ++ctrl+c++) + ### View Network Logs #### To view NetworkManager daemon related logs for troubleshooting -1. View network-related logs +1. View network-related logs ```bash journalctl -u NetworkManager diff --git a/docs/labs/systems_administration_I/lab6-user_and_group_management.md b/docs/labs/systems_administration_I/lab6-user_and_group_management.md index 8798f5693e..4d74c5bbe8 100644 --- a/docs/labs/systems_administration_I/lab6-user_and_group_management.md +++ b/docs/labs/systems_administration_I/lab6-user_and_group_management.md @@ -9,18 +9,16 @@ tags: - groups --- - - # Lab 6: User and group management ## Objectives After completing this lab, you will be able to -- Add and remove users on the system -- Add and remove groups on the system -- Modify users and groups on the system -- Change passwords +- Add and remove users on the system +- Add and remove groups on the system +- Modify users and groups on the system +- Change passwords Estimated time to complete this lab: 40 minutes @@ -30,8 +28,8 @@ User management is important in any multi-user network operating system. Linux i Managing users on a system is intricately tied to the system's security. There is an old saying that: ->A system is as secure as its weakest user. - +>A system is as secure as its weakest user. + Linux inherits the old UNIX tradition of governing access to files, programs and other resources on a per-user and per-group basis. Just like almost all other configurations in Linux, user management can be carried out by directly editing configuration files that can be found in the file system hierarchy. This lab will explore user management through the manual way and also through the use of system utilities. @@ -42,42 +40,42 @@ Important user and group management files are below. Some of the fields or entri ### /etc/passwd -* **Purpose:** user account information -* **Content:** - * login name - * encrypted password - * user id (UID) - * group id (GID) - * user full name - * user home directory - * default shell +- **Purpose:** user account information +- **Content:** + - login name + - encrypted password + - user id (UID) + - group id (GID) + - user full name + - user home directory + - default shell ### /etc/shadow -* **Purpose:** secure user account information -* **Content:** - * login name - * hashed password - * days since Jan. 1, 1970 that password was last changed - * days before which password may not be changed. Usually zero. - * days after which password must be changed - * days before password expiry that user is warned of pending expiration - * days after password expiry that account is considered inactive and disabled - * days since Jan. 1, 1970 when account will be disabled - * reserved +- **Purpose:** secure user account information +- **Content:** + - login name + - hashed password + - days since Jan. 1, 1970 that password was last changed + - days before which password may not be changed. Usually zero. + - days after which password must be changed + - days before password expiry that user is warned of pending expiration + - days after password expiry that account is considered inactive and disabled + - days since Jan. 1, 1970 when account will be disabled + - reserved ### /etc/group -* **Purpose:** group information -* **Content:** - * name of the group - * the group's password - * the group id (GID) - * list of users belonging to the group +- **Purpose:** group information +- **Content:** + - name of the group + - the group's password + - the group id (GID) + - list of users belonging to the group ### /etc/skel -* **Purpose:** Stores templates to be applied to new accounts +- **Purpose:** Stores templates to be applied to new accounts ## Common utilities @@ -136,6 +134,7 @@ Some common utilities used in the day-to-day user and group management tasks are -P, --prefix PREFIX_DI directory prefix -U, --users USERS list of user members of this group ``` + ### `passwd` ```bash @@ -177,7 +176,6 @@ In this lab you will create a new user called “Me Mao”. The user name for System configurations usually conform to a specific format. It is always important to adhere to this format when manually editing the configuration files. One way to do this is to find and copy an existing entry in the file and then modify the copied line/section with any new changes. This will help reduce the chances of you making errors. - 1. Log in to the computer as root 2. Use the `tail` command to view the last 4 entries at the bottom of the `/etc/passwd` file. @@ -189,13 +187,12 @@ In this lab you will create a new user called “Me Mao”. The user name for ntp:x:38:38::/etc/ntp:/sbin/nologin gdm:x:42:42::/var/gdm:/sbin/nologin ``` - - You will edit the passwd file using the format displayed above. + You will edit the passwd file using the format displayed above. #### To create the user -1. We'll need to edit the `/etc/passwd` file. +1. We will need to edit the `/etc/passwd` file. Launch your editor of choice and open up the file “/etc/passwd” @@ -204,46 +201,47 @@ In this lab you will create a new user called “Me Mao”. The user name for ```bash me:x:500:500:me mao:/home/me:/bin/bash ``` - + 2. Save your changes and close the passwd file. 3. Next we'll edit the `/etc/shadow` file. Launch your editor and open up the “/etc/shadow” file. Add a new entry like the one below to the bottom of the file - put an asterisk (*) in the password field. Type: - + ```bash me:x:11898:11898:99999:7::: ``` 4. Save your changes and close the shadow file. -5. We'll edit the `/etc/group` file next. +5. We will edit the `/etc/group` file next. Launch your editor and open up the `/etc/group` file. At the bottom of the file add a new entry like: - + ```bash me:x:1000:me ``` - + 6. Save your changes and close the group file. 7. Time to create the home directory. - - Copy the entire contents of the “/etc/skel” directory into /home directory, renaming the new directory to the name of the user i.e. “/home/me”. Type : + + Copy the entire contents of the “/etc/skel” directory into /home directory, renaming the new directory to the name of the user i.e. “/home/me”. Type: ```bash [root@localhost root]# cp -r /etc/skel /home/me ``` - + 8. The root user owns the directory you just created, because she created it. In order for the user “me mao” to be able to use the directory you will change the permissions/ownership of the folder. Type: - + ```bash - [root@localhost root]# chown -R me:me /home/me + [root@localhost root]# chown -R me:me /home/me ``` + 9. Create a password for the user. Set the value of the password to be `a!b!c!d!`. - You will use the “passwd” utility. + You will use the “passwd” utility. Type “passwd” and follow the prompts - + ```bash [root@localhost root]# passwd me Changing password for user me. @@ -273,26 +271,26 @@ You will also create a group called “common” and add the user "me" and "ying 1. Login to the system as root. 2. You will create the user ying using all the defaults of the `useradd` command. Type: - + ```bash [root@localhost root]# useradd -c "Ying Yang" ying ``` 3. Use the `tail` command to examine the addition you just made to the `/etc/passwd` file. Type: - + ```bash flatpak:x:982:982:User for flatpak system helper:/:/sbin/nologin pesign:x:981:981:Group for the pesign signing daemon:/run/pesign:/sbin/nologin me:x:1000:1000:99999:7::: ying:x:1001:1001:Ying Yang:/home/ying:/bin/bash ``` - + !!! Question - + List the new entry here? - -4. The user ying will not be able to login to the system until you create a password for the user. Set ying's password to be `y@i@n@g@`. Type: - + +4. The user ying will not be able to login to the system until you create a password for the user. Set ying's password to be `y@i@n@g@`. Type: + ```bash [root@localhost root]# passwd ying Changing password for user ying. @@ -300,79 +298,92 @@ You will also create a group called “common” and add the user "me" and "ying Retype new password: ********** passwd: all authentication tokens updated successfully. ``` - + 5. Use the `id` utility to quickly view information about the new users you just created. Type: - + ```bash [root@localhost root]# id me uid=1000(me) gid=1000(me) groups=1000(me) ``` - + 6. Do the same thing for the user ying. Type: ```bash [root@localhost root]# id ying uid=501(ying) gid=501(ying) groups=501(ying) ``` - + #### To automatically create a new group 1. Use the `groupadd` program to create the new group “common”. - + ```bash [root@localhost root]# groupadd common ``` - -2. Examine the tail end of the `/etc/group` file to see the new addition. - + +2. Examine the tail end of the `/etc/group` file to see the new addition. + !!! Question - + What is the command to do this? - + 3. Use the `usermod` command to add an existing user to an existing group. Let's add the user ying to the `common` group we just created in Step 1. Type: - + ```bash [root@localhost root]# usermod -G common -a ying ``` 4. Do the same things for the user me. Type: - + ```bash [root@localhost root]# usermod -G common -a me ``` - -5. Run the `id` command again on the users “ying” and "me" . What has changed? + +5. Run the `id` command again on the users “ying” and "me". + + !!! Question + + What has changed? 6. Use the `grep` command to view changes to the `common` group entry in the file. Type: - + ```bash [root@localhost root]# grep common /etc/group common:x:1002:ying,me ``` - -#### To modify a user account +#### To modify a user account 1. Use the `usermod` command to change the comment field for the user “me”. The new comment you will add will be “first last”. Type: - + ```bash [root@localhost root]# usermod -c "first last" me ``` - Use the `tail` command to examine your changes to the `/etc/passwd` file. Write the changed line below? + Use the `tail` command to examine your changes to the `/etc/passwd` file. -2. What is the user me’s login shell? + !!! Question + + Write the changed line below. + + !!! Question + + What is the user me’s login shell? + +2. Use the `usermod` command again to change me’s login shell to the csh shell. Type: -3. Use the `usermod` command again to change me’s login shell to the csh shell. Type: - ```bash [root@localhost root]# usermod -s /bin/csh me ``` - -4. Finally use the `usermod` command to undo all the changes you made to the user “me” above. - - Restore the values ( login shell etc..) to their original values. Write down the commands to do this? - + +3. Finally use the `usermod` command to undo all the changes you made to the user “me” above. + + Restore the values ( login shell etc..) to their original values. + + !!! question + + What is the commands to do this? + ## Exercise 3 ### Set user @@ -386,53 +397,57 @@ The HOME, LOGNAME, and USER environment variables will be set to those of the te #### To temporarily become another user 1. While logged in as the root user, switch to the user “me”. Type: - + ```bash [root@localhost root]# su me [me@localhost root]$ ``` - + The `su` command did not prompt you for the user me’s password because you are root 2. Change to me’s home directory. - + ```bash [me@localhost root]$ cd [me@localhost me]$ cd ``` - + 3. While temporarily logged in as me, use `su` to login as the user ying. Type: - + ```bash [me@localhost me]$ su ying password: [ying@localhost me]$ ``` - + 4. To logout of ying’s account type: - + ```bash [ying@localhost me]$ exit ``` - + This will throw you back into me’s account. - -5. Logout of me’s account to get back to the root account. What is the command? + +5. Logout of me’s account to get back to the root account. + + !!! question + + What is the command? #### To make `su` inherit all environmental variables of the new user 1. To force `su` to use all the environmental variables of the temporary user. Type: - + ```bash [root@system1 root]# su - me [me@system1 me]$ ``` - + The difference is immediately obvious. Notice the current working directory. - + 2. Logout of the system completely and reboot the machine. 3. All done with Lab 6! diff --git a/docs/labs/systems_administration_I/lab7-software_management.md b/docs/labs/systems_administration_I/lab7-software_management.md index 1f9657d63c..ee427c85c1 100644 --- a/docs/labs/systems_administration_I/lab7-software_management.md +++ b/docs/labs/systems_administration_I/lab7-software_management.md @@ -45,13 +45,13 @@ The applications used for managing software on Linux distributions are called pa Some popular command-line options and syntax for the RPM command are listed next: -**rpm** +### `rpm` Usage: rpm [OPTION...] **QUERYING PACKAGES** -``` +```bash Query options (with -q or --query): -c, --configfiles list all configuration files -d, --docfiles list all documentation files @@ -65,7 +65,7 @@ Query options (with -q or --query): **VERIFYING PACKAGES** -``` +```bash Verify options (with -V or --verify): --nofiledigest don't verify digest of files --nofiles don't verify files in package @@ -75,7 +75,7 @@ Verify options (with -V or --verify): **INSTALLING, UPGRADING, AND REMOVING PACKAGES** -``` +```bash Install/Upgrade/Erase options: --allfiles install all files, even configurations that might otherwise be skipped -e, --erase=+ erase (uninstall) package @@ -113,20 +113,20 @@ In this Lab, you will learn how to use the RPM system and install a sample appli #### To query packages for information 1. To see a list of all the packages currently installed on your local system type: - - ``` + + ```bash $ rpm -qa python3-gobject-base-* NetworkManager-* rocky-repos-* ...... ``` - + You should see a long list. 2. Let us delve a little deeper and learn more about one of the packages installed on the system. We will examine NetworkManager. We will use the --query (-q) and --info (-i) options with the `rpm` command. Type: - ``` + ```bash $ rpm -qi NetworkManager Name : NetworkManager Epoch : 1 @@ -139,22 +139,22 @@ In this Lab, you will learn how to use the RPM system and install a sample appli For example, to view only the Summary field, type: - ``` - $ rpm -q --queryformat '%{summary}\n' NetworkManager + ```bash + rpm -q --queryformat '%{summary}\n' NetworkManager ``` The name of the field is case-insensitive. 4. To view both the Version and Summary fields of the installed NetworkManager package type: - ``` - $ rpm -q --queryformat '%{version} %{summary}\n' NetworkManager + ```bash + rpm -q --queryformat '%{version} %{summary}\n' NetworkManager ``` 5. Type the command to view information about the bash package that is installed on the system. - - ``` - $ rpm -qi bash + + ```bash + rpm -qi bash ``` !!! note @@ -163,8 +163,8 @@ In this Lab, you will learn how to use the RPM system and install a sample appli 6. First, ensure the `wget` application is not already installed on the system. Type: - ``` - $ rpm -q wget + ```bash + rpm -q wget package wget is not installed ``` @@ -172,20 +172,20 @@ In this Lab, you will learn how to use the RPM system and install a sample appli 7. As of Rocky Linux 8.x, the `dnf download` command will allow you to get the latest `rpm` package for `wget`. Type: - ``` + ```bash dnf download wget ``` 8. Use the `ls` command to ensure that the package was downloaded into your current directory. Type: - ``` - $ ls -lh wg* + ```bash + ls -lh wg* ``` 9. Use the `rpm` command to query for information about the downloaded wget-*.rpm. Type: - ``` - $ rpm -qip wget-*.rpm + ```bash + rpm -qip wget-*.rpm Name : wget Architecture: x86_64 Install Date: (not installed) @@ -193,12 +193,14 @@ In this Lab, you will learn how to use the RPM system and install a sample appli ...... ``` -10. From your output in the previous step, what exactly is the `wget` package? Hint: you can use the rpm query format option to view the description field for the download package. + !!! question + + From your output in the previous step, what exactly is the `wget` package? Hint: you can use the `rpm` query format option to view the description field for the download package. -11. If you are interested in the `wget files-.rpm` package, you could list all the files included in the package by typing: +10. If you are interested in the `wget files-.rpm` package, you could list all the files included in the package by typing: - ``` - $ rpm -qlp wget-*.rpm | head + ```bash + rpm -qlp wget-*.rpm | head /etc/wgetrc /usr/bin/wget ...... @@ -208,10 +210,10 @@ In this Lab, you will learn how to use the RPM system and install a sample appli /usr/share/doc/wget/NEWS ``` -12. Let us view the contents of the `/usr/share/doc/wget/AUTHORS` file listed as part of the `wget` package. We will use the `cat` command. Type: +11. Let us view the contents of the `/usr/share/doc/wget/AUTHORS` file listed as part of the `wget` package. We will use the `cat` command. Type: - ``` - $ cat /usr/share/doc/wget/AUTHORS + ```bash + cat /usr/share/doc/wget/AUTHORS cat: /usr/share/doc/wget/AUTHORS: No such file or directory ``` @@ -219,7 +221,7 @@ In this Lab, you will learn how to use the RPM system and install a sample appli 13. View the list of files that come with another package (curl) that is *already* installed on the system. Type: - ``` + ```bash $ rpm -ql curl /usr/bin/curl /usr/lib/.build-id @@ -233,48 +235,48 @@ In this Lab, you will learn how to use the RPM system and install a sample appli #### Extended knowledge about package name -* **Full package name** : When you download a package from a trusted source (for example - vendor website, developer repository), the name of the downloaded file is the full package name, such as -- htop-3.2.1-1.el8.x86_64.rpm. When using the `rpm` command to install/update this package, the object operated by the command must be the full name (or matching wildcard equivalent) of the package, such as: - - ``` - $ rpm -ivh htop-3.2.1-1.el8.x86_64.rpm - ``` +- **Full package name** : When you download a package from a trusted source (for example - vendor website, developer repository), the name of the downloaded file is the full package name, such as -- htop-3.2.1-1.el8.x86_64.rpm. When using the `rpm` command to install/update this package, the object operated by the command must be the full name (or matching wildcard equivalent) of the package, such as: - ``` - $ rpm -Uvh htop-3.2.1-1.*.rpm + ```bash + rpm -ivh htop-3.2.1-1.el8.x86_64.rpm ``` - ``` - $ rpm -qip htop-3.*.rpm + ```bash + rpm -Uvh htop-3.2.1-1.*.rpm ``` + ```bash + rpm -qip htop-3.*.rpm ``` - $ rpm -qlp wget-1.19.5-11.el8.x86_64.rpm + + ```bash + rpm -qlp wget-1.19.5-11.el8.x86_64.rpm ``` The full name of the package follows a naming convention similar to this —— `[Package_Name]-[Version]-[Release].[OS].[Arch].rpm` or `[Package_Name]-[Version]-[Release].[OS].[Arch].src.rpm` -* **Package name**: Because RPM uses a database to manage software, the database will have corresponding records once the package installation completes. Currently, the operating object of the `rpm` command only needs to type the package name. such as: +- **Package name**: Because RPM uses a database to manage software, the database will have corresponding records once the package installation completes. Currently, the operating object of the `rpm` command only needs to type the package name. such as: - ``` - $ rpm -qi bash + ```bash + rpm -qi bash ``` - ``` - $ rpm -q systemd + ```bash + rpm -q systemd ``` + ```bash + rpm -ql chrony ``` - $ rpm -ql chrony - ``` - + ## Exercise 2 ### Package integrity 1. It is possible to download or end up with a corrupted or tainted file. Verify the integrity of the `wget` package that you downloaded. Type: - ``` - $ rpm -K wget-*.rpm + ```bash + rpm -K wget-*.rpm wget-1.19.5-10.el8.x86_64.rpm: digests signatures OK ``` @@ -282,13 +284,13 @@ In this Lab, you will learn how to use the RPM system and install a sample appli 2. Let us be malicious and deliberately alter the downloaded package. This can be done by adding anything to, or removing something from, the original package. Anything that changes the package in a way the original packagers did not intend will corrupt the package. We will alter the file using the `echo` command to add the string "haha" to the package. Type: - ``` - $ echo haha >> wget-1.19.5-10.el8.x86_64.rpm + ```bash + echo haha >> wget-1.19.5-10.el8.x86_64.rpm ``` 3. Now try to verify the integrity of the package again using rpm's -K option. - ``` + ```bash $ rpm -K wget-*.rpm wget-1.19.5-10.el8.x86_64.rpm: DIGESTS SIGNATURES NOT OK ``` @@ -296,9 +298,9 @@ In this Lab, you will learn how to use the RPM system and install a sample appli It is a very different message now. The output "DIGESTS SIGNATURES NOT OK" clearly warns you should not try using or installing the package. It should no longer be trusted. 4. Use the `rm` command to delete the corrupted `wget` package file and download a fresh copy using `dnf`. Type: - - ``` - $ rm wget-*.rpm && dnf download wget + + ```bash + rm wget-*.rpm && dnf download wget ``` Check one more time that the newly downloaded package passes RPMs integrity checks. @@ -319,8 +321,8 @@ In this exercise you will try to install the `wget` package (wget-*.rpm). 1. Try installing the `wget` application. Use RPM's -ivh command line options. Type: - ``` - $ rpm -ivh wget-*.rpm + ```bash + rpm -ivh wget-*.rpm error: Failed dependencies: libmetalink.so.3()(64bit) is needed by wget-* ``` @@ -331,9 +333,9 @@ In this exercise you will try to install the `wget` package (wget-*.rpm). According to the output of the test above, the wget-*.rpm package requires that the libmetalink-*.rpm package be installed. In other words, libmetalink is a prerequisite for installing wget-*.rpm. You can forcefully install wget-*.rpm package using the “nodeps” option if you absolutely know what you are doing, but this is generally a BAD practice. -2. RPM has helpfully given us a hint for what is missing. You will remember that rpm knows the what and how but does not necessarily know the where. Let us use the `dnf` utility to determine the package name that provides the missing library. Type: - - ``` +2. RPM has helpfully given us a hint for what is missing. You will remember that `rpm` knows the what and how but does not necessarily know the where. Let us use the `dnf` utility to determine the package name that provides the missing library. Type: + + ```bash $ dnf whatprovides libmetalink.so.3 ...... libmetalink-* : Metalink library written in C @@ -344,56 +346,56 @@ In this exercise you will try to install the `wget` package (wget-*.rpm). 3. From the output, we need to download the `libmetalink` package that provides the missing library. Specifically, we want the 64bit version of the library. Let us call on a separate utility (`dnf`) to help us find and download the package for our demo 64-bit (x86_64) architecture. Type: - ``` + ```bash dnf download --arch x86_64 libmetalink ``` 4. You should now have at least 2 rpm packages in your working directory. Use the `ls` command to confirm this. 5. Install the missing `libmetalink` dependency. Type: - - ``` - $ sudo rpm -ivh libmetalink-*.rpm + + ```bash + sudo rpm -ivh libmetalink-*.rpm ``` 6. With the dependency now installed, we can now revisit our original objective of installing the `wget` package. Type: + ```bash + sudo rpm -ivh wget-*.rpm ``` - $ sudo rpm -ivh wget-*.rpm - ``` - + !!! note - + RPM supports transactions. In the previous exercises, we could have performed a single rpm transaction that included the original package we wanted to install and all the packages and libraries it depended on. A single command such as the one below would have sufficed: - ``` - $ rpm -Uvh wget-*.rpm libmetalink-*.rpm + ```bash + rpm -Uvh wget-*.rpm libmetalink-*.rpm ``` 7. Moment of truth now. Try running the `wget` program without any option to see if it is installed. Type: - ``` - $ wget + ```bash + wget ``` 8. Let us see `wget` in action. Use `wget` to download a file from the internet from the command line. Type: - ``` + ```bash wget https://kernel.org ``` This will download the default index.html from kernel.org website! 9. Use `rpm` to view a list of all the files included with the `wget` application. - + 10. Use `rpm` to view any documentation packaged with `wget`. - + 11. Use `rpm` to view the list of all the binaries installed with the `wget` package. 12. You had to install the `libmetalink` package to install `wget`. Try running or executing `libmetalink` from the command-line. Type: - - ``` - $ libmetalink + + ```bash + libmetalink -bash: libmetalink: command not found ``` @@ -401,16 +403,15 @@ In this exercise you will try to install the `wget` package (wget-*.rpm). What gives? Why can't you run or execute `libmetalink`? -#### To import a public key via rpm +#### To import a public key via `rpm` !!! tip The GPG keys used for signing packages used in the Rocky Linux project can be obtained from various sources such as - the Project website, ftp site, distribution media, local source and so on. Just in case the proper key is missing on your RL system's keyring, you can use the `rpm`'s `--import` option to import Rocky Linux’s public key from your local RL system by running: `sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial` !!! question - - When installing packages, what is the difference between `rpm -Uvh` and `rpm -ivh`. - Consult the man page for `rpm`. + + When installing packages, what is the difference between `rpm -Uvh` and `rpm -ivh`? Consult the man page for `rpm`. ## Exercise 4 @@ -418,14 +419,14 @@ In this exercise you will try to install the `wget` package (wget-*.rpm). Uninstalling packages is as easy as installing with Red Hat’s package manager (RPM). - In this exercise, you will try to use `rpm` to uninstall some packages from the system. +In this exercise, you will try to use `rpm` to uninstall some packages from the system. #### To uninstall packages 1. Uninstall the `libmetalink` package from your system. Type: - ``` - $ sudo rpm -e libmetalink + ```bash + sudo rpm -e libmetalink ``` !!! question @@ -434,12 +435,12 @@ Uninstalling packages is as easy as installing with Red Hat’s package manager 2. The clean and proper way to remove packages using RPM is to remove the package(s) along with their dependencies. To remove `libmetalink` package we will also have to remove the `wget` package that depends on it. Type: - ``` - $ sudo rpm -e libmetalink wget + ```bash + sudo rpm -e libmetalink wget ``` !!! note - + If you want to break the package that relies on libmetalink and *forcefully* remove the package from your system, you can use rpm's `--nodeps` option like this: `$ sudo rpm -e --nodeps libmetalink`. **i.** The “nodeps” option means No dependencies. I.e., ignore all dependencies. @@ -458,7 +459,7 @@ DNF (and other tools like it) acts as a sort of wrapper around RPM and provides Common options used with the `dnf` utility are: -``` +```bash usage: dnf [options] COMMAND List of Main Commands: @@ -501,16 +502,16 @@ Assuming you have already uninstalled the `wget` utility from an exercise, we wi 1. First, let us ensure that `wget` and `libmetalink` are uninstalled from the system. Type: + ```bash + sudo rpm -e wget libmetalink ``` - $ sudo rpm -e wget libmetalink - ``` - + After removing, if you try running `wget` from the CLI you see a message like *wget: command not found* -2. Now use dnf to install `wget`. Type: +2. Now use `dnf` to install `wget`. Type: - ``` - $ sudo dnf -y install wget + ```bash + sudo dnf -y install wget Dependencies resolved. ...... Installed: @@ -524,40 +525,40 @@ Assuming you have already uninstalled the `wget` utility from an exercise, we wi 3. DNF provides an "Environment Group" option that makes adding a new feature set to a system easy. To add the feature, you would typically have to install a few packages individually, but using `dnf`, all you need to know is the name or description of the feature you want. Use `dnf` to display a list of available groups. Type: - ``` - $ dnf group list + ```bash + dnf group list ``` 4. We are interested in the "Development Tools" group/feature. Let us get more information about that group. Type: - ``` - $ dnf group info "Development Tools" + ```bash + dnf group info "Development Tools" ``` 5. Later, we will need some programs with the "Development Tools" group. Install the "Development Tools" group using `dnf` by running: - ``` - $ sudo dnf -y group install "Development Tools" + ```bash + sudo dnf -y group install "Development Tools" ``` #### To use `dnf` for uninstalling packages 1. To use `dnf` to uninstall the `wget` package type: - ``` - $ sudo dnf -y remove wget + ```bash + sudo dnf -y remove wget ``` 2. Use `dnf` to ensure the package has indeed been removed from the system. Type: - ``` - $ sudo dnf -y remove wget + ```bash + sudo dnf -y remove wget ``` 3. Try using/running `wget`. Type: - ``` - $ wget + ```bash + wget ``` #### To use `dnf` for package update @@ -566,32 +567,32 @@ DNF can check for and install the latest version of individual packages availabl 1. Use the list option with `dnf` to view your system's available versions of the `wget` program. Type: - ``` - $ dnf list wget + ```bash + dnf list wget ``` 2. If you only want to see if there are updated versions available for a package, use the check-update option with `dnf`. For example, for the `wget` package type: - ``` - $ dnf check-update wget + ```bash + dnf check-update wget ``` 3. Now, list all the available versions for the kernel package for your system. Type: - ``` - $ sudo dnf list kernel + ```bash + sudo dnf list kernel ``` 4. Next, check if any updated packages are available for the installed kernel package. Type: - ``` - $ dnf check-update kernel + ```bash + dnf check-update kernel ``` 5. Package updates might be due to bug fixes, new features, or security patches. To view if there are any security related updates for the kernel package, type: - ``` - $ dnf --security check-update kernel + ```bash + dnf --security check-update kernel ``` #### To use `dnf` for system updates @@ -600,20 +601,20 @@ DNF can be used to check for and install the latest versions all packages instal 1. To check if there are any updates for the packages you currently have installed on your system, type: - ``` - $ dnf check-update + ```bash + dnf check-update ``` 2. To check if there are any security related updates for all packages installed on your system, type: - ``` - $ dnf --security check-update + ```bash + dnf --security check-update ``` 3. To update the entire packages installed on your system to the most up-to-date versions available for your distribution run: - ``` - $ dnf -y check-update + ```bash + dnf -y check-update ``` ## Exercise 6 @@ -638,13 +639,13 @@ The following exercises will be based on the venerable Hello project source code 2. Unpack (un-tar) the tarball using the `tar` program. Type: + ```bash + tar -xvzf hello-2.12.tar.gz ``` - $ tar -xvzf hello-2.12.tar.gz - ``` - + OUTPUT: - - ``` + + ```bash hello-2.12/ hello-2.12/NEWS hello-2.12/AUTHORS @@ -659,16 +660,16 @@ The following exercises will be based on the venerable Hello project source code 4. Change to that directory and list its contents. Type: - ``` - $ cd hello-2.12 ; ls + ```bash + cd hello-2.12 ; ls ``` 5. Reviewing any special installation instructions that might come with the source code is always good practice. Those files usually have names like: INSTALL, README and so on. Use a pager to open up the INSTALL file and read it. Type: - ``` - $ less INSTALL + ```bash + less INSTALL ``` Exit the pager when you are done reviewing the file. @@ -683,16 +684,16 @@ The script that usually lets you configure the software is usually aptly named Make sure that you have the "Development Tools" package group installed before attempting to complete the following exercises. + ```bash + sudo dnf -y group install "Development Tools" ``` - $ sudo dnf -y group install "Development Tools" - 1. Use the `ls` command again to ensure that you indeed have a file named *configure* in your pwd. 2. To see all the options, you can enable or disable in the `hello` program type: - ``` - $ ./configure --help + ```bash + ./configure --help ``` !!! question @@ -701,8 +702,8 @@ The script that usually lets you configure the software is usually aptly named 3. If you are happy with the default options that the configure script offers. Type: - ``` - $ ./configure + ```bash + ./configure ``` !!! note @@ -721,12 +722,13 @@ You will build the hello application in the following steps. This is where some 1. Use the make command to compile the package after running the “configure” script. Type: - ``` - $ make + ```bash + make ``` OUTPUT: - ``` + + ```bash gcc -g -O2 -o hello src/hello.o ./lib/libhello.a make[2]: Leaving directory '/home/rocky/hello-2.12' ...... @@ -743,8 +745,8 @@ Amongst other housekeeping tasks, the final installation step also involves copy 1. To install the hello application run the make install command. Type: - ``` - $ sudo make install + ```bash + sudo make install ``` This will install package into the location specified by the default prefix (--prefix) argument that may have been used with the “configure” script earlier. If no --prefix was set, a default prefix of `/usr/local/` will be used. @@ -752,36 +754,37 @@ Amongst other housekeeping tasks, the final installation step also involves copy #### To run the hello program 1. Use the `whereis` command to see where the `hello` program is on your system. Type: - - ``` - $ whereis hello + + ```bash + whereis hello ``` 2. Try running the `hello` application to see what it does. Type: - - ``` - $ hello + + ```bash + hello ``` 3. Run `hello` again, with the `--help` option to see the other things it can do. 4. Now using `sudo`, run `hello` again as a superuser. Type: - - ``` - $ sudo hello + + ```bash + sudo hello ``` OUTPUT: - ``` + + ```bash sudo: hello: command not found ``` - + !!! Question Investigate what causes the error when you try running `hello` with `sudo`. Fix the issue and make sure the `hello` program can be used with `sudo`. !!! tip - + It is good practice to test a program as a regular user to ensure that regular users can indeed use the program. It is possible that the permissions on the binary are set incorrectly such that only the super-user can use the programs. This of course assumes that you indeed want regular users to be able to use the program. 5. That's it. This exercise is complete! @@ -798,49 +801,50 @@ Using the "-V" option of the `rpm` command. Take the time synchronization program `chrony` as an example to illustrate the meaning of its output. - 1. To demonstrate how the `rpm` package verification works, make a modification to chrony's configuration file - `/etc/chrony.conf`. (It is assumed that you have installed chrony). Add 2 harmless comment `##` symbols to the end of the file. Type: - ``` - $ echo -e "##" | sudo tee -a /etc/chrony.conf - ``` - + ```bash + echo -e "##" | sudo tee -a /etc/chrony.conf + ``` + 2. Now run the `rpm` command with the `--verify` option. Type: - ``` - $ rpm -V chrony - ``` - OUTPUT: - ``` - S.5....T. c /etc/chrony.conf - ``` + ```bash + rpm -V chrony + ``` + + OUTPUT: + + ```bash + S.5....T. c /etc/chrony.conf + ``` - The output is broken down into 3 separate columns. + The output is broken down into 3 separate columns. - **First Column (S.5....T.)** + - **First Column (S.5....T.)** -The sample output - `S.5....T.` indicates the 9 fields that are used to indicate useful information about the validity of files in an RPM package. Any field or characteristic that passed a given check/test is indicated by a ".". + The sample output - `S.5....T.` indicates the 9 fields that are used to indicate useful information about the validity of files in an RPM package. Any field or characteristic that passed a given check/test is indicated by a ".". -These 9 different fields or checks are described here: + These 9 different fields or checks are described here: - * S: Whether the size of the file has been modified. - * M: Whether the type of file or file permissions (rwx) have been modified. - * 5: Whether the file MD5 checksum has modified. - * D: Whether the number of the device has been modified. - * L: Whether the path to the file has been modified. - * U: Whether the owner of the file has been modified. - * G: Whether the group to which the file belongs has been modified. - * T: Whether the mTime (modify time) of the file has been modified. - * P: Whether the program function has been modified. + - S: Whether the size of the file has been modified. + - M: Whether the type of file or file permissions (rwx) have been modified. + - 5: Whether the file MD5 checksum has modified. + - D: Whether the number of the device has been modified. + - L: Whether the path to the file has been modified. + - U: Whether the owner of the file has been modified. + - G: Whether the group to which the file belongs has been modified. + - T: Whether the mTime (modify time) of the file has been modified. + - P: Whether the program function has been modified. - **Second Column (c)** + - **Second Column (c)** -* **c**: Indicates modifications to the configuration file. It can also be the following values: - * d: documentation file. - * g: ghost file. Very few can be seen. - * l: license file. - * r: readme file. + - **c**: Indicates modifications to the configuration file. It can also be the following values: + - d: documentation file. + - g: ghost file. Very few can be seen. + - l: license file. + - r: readme file. - **Third column (/etc/chrony.conf)** + - **Third column (/etc/chrony.conf)** - * **/etc/chrony.conf**: Represents the path of the modified file. + - **/etc/chrony.conf**: Represents the path of the modified file. diff --git a/docs/labs/systems_administration_I/lab8-system_and_process_monitoring-I.md b/docs/labs/systems_administration_I/lab8-system_and_process_monitoring-I.md index c1424878a0..bf7a31767e 100644 --- a/docs/labs/systems_administration_I/lab8-system_and_process_monitoring-I.md +++ b/docs/labs/systems_administration_I/lab8-system_and_process_monitoring-I.md @@ -1,6 +1,6 @@ --- author: Wale Soyinka -contributors: +contributors: Steven Spencer, Ganna Zhyrnova tested on: All Versions tags: - system monitoring