Jump to: navigation, search

OPS235 Lab 4

1,240 bytes removed, 23:02, 21 June 2016
no edit summary
:'''Perform the following steps:'''
#Launch and use Remain in your '''centos2centos1''' VM for this partsection.<ol> <li value="2">Use # To verify the '''man''' pages to learn about the '''systemctl''' command.</li><li>Issue status of your iptables service, issue the following Linux command: <ul> <li><b><code><span style="color:#3366CC;font-size:1.2em;">systemctl list-units --allstatus iptables</span></code></b></li> </ul> </li> <li>Note the services that are currently running.</li> <li># Use the command <b><code><span style="color:#3366CC;font-size:1.2em;">systemctl stop iptables</span></code></b> commands you used in Lab2 to '''stop the service named '''iptablesand '''disable'''</li>the iptables service. <li>Run the following # Issue a command to verify that the you '''iptablesdisabled''' service has stopped:<br><b><code><span style="color:#3366CC;font-size:1.2em;">systemctl list-units iptables</span></code></b>.</li><li>Issue the following command: <span style="font-family:courier;font-size:1.2em;font-weight:bold;">and '''systemctl disable iptablesstopped'''</span> &nbsp; (disable iptables service so it does NOT run upon system startup)<br><br></li> <li>If you reboot now - the iptables service will NOT be turned on upon system boot-up. We don't want it on though at this point anyways since it causes students headaches.</li> <li>Use # Issue the commands to '''systemctlstart''' command to verify that the and '''iptablesenable''' the iptables service is no longer running , and '''verify''' that it is disabled.<u>started</liu>and <u>enabled</olu>.
:'''Perform the following steps:'''
#Perform this part Remain in both your '''centos2centos1''' and '''centos3''' VMsVM for this section.<ol> <li value="2"># Issue the following Linux command: <ul> <li><b><code><span style="color:#3366CC;font-size:1.2em;">runlevel</span></code></b></li> </ul> </li> <li>Note the difference in output between '''centos2''' and '''centos3'''.</li> <li># You can use the '''init''' command to change the current run-level. See a list of runlevels [ here].</li><li> Use the '''man''' command to learn how to use # Issue the '''init''' command. Use this command to change the current run-level in '''centos2centos1''' to '''3'''. What happened?</li> <li># Issue the following Linux command: <ul> <li><b><code><span style="color:#3366CC;font-size:1.2em;">startx</span></code></b></li> </ul> </li> <libr>What happens?</li> <li># Log-off your graphical system. You should return to your shell prompt.</li> <li>Using systemd requires a different method of setting text mode and graphical mode. You can refer to this link for future reference: [ How Reissue the init command to Change Runchange the current run-Levels with Systemd]</li><li>Restart your centos2 machine, and make certain that it runs in level back to '''graphical5''' mode</li> </libr>Did it work? Why would you want to make a graphical Linux system run in text-based mode?</li></ol> 
'''Answer INVESTIGATION 2 observations / questions in your lab log book.'''
#Change to the '''/root/bin''' directory.
#Download, study, and run the following shell script. Issue the command:<br><b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">wget</span></code></b>
#Try to understand what these Bash Shell scripts do, and then run the script as rootto create just one user called '''test'''. After running the shell script, view the contents of the '''/home''' directory to confirm.
<ol><li value="3">Open a Bash shell terminal and login as root.</li><li>Change to the '''/root/bin''' directory.</li><li>Use the wget command to download the input file called user-data.txt by issuing the command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">wget</span></code></b></li><li>View the contents on the user-data.txt file to confirm there are 3 fields (username, fullname, and e-mail address)which are separated by the colon (:) symbol.<li><li>Use a text editor (such as <b><code><span style="color:#3366CC;font-size:1.2em;">vi</span></code></b> or <b><code><span style="color:#3366CC;font-size:1.2em;">nano</span></code></b>) to create a Bash Shell script called: <b><code><span style="color:#3366CC;font-size:1.2em;">createUsers.bash</span></code></b> in /root's home directory.</li><li>Enter the following text content into your text-editing session:</li></ol>
<code style="color:#3366CC;font-family:courier;font-size:.9em;margin-left:20px;font-weight:bold;">

Navigation menu