Changes

Jump to: navigation, search

OPS235 Lab 4 - CentOS7

2,750 bytes added, 11:16, 28 March 2015
no edit summary
# Use the usermod command to associate each of your pod mates' full name to their user name. With each change, examine their entries in the <code>/etc/passwd</code> file. What has changed?
# Be sure to record your observations in your lab notes.
 
=Managing Run-Levels and System Services=
 
===Investigation 4: How do we Manage Runlevels?===
 
{{Admon/note|Use centos2 and centos3|Perform these steps in both of these virtual machines.}}
 
The runlevel command is now deprecated in Fedora, and will likely be deprecated in RHEL/CentOS at some point as well, but for now this is what the industry is using.
 
<ol>
<li>Issue the following Linux command:
<ul>
<li><code>runlevel</code></li>
</ul>
</li>
<li>Note the difference in output between centos2 and centos3.</li>
<li>You can use the <code>init</code> command to change the current runlevel. See a list of runlevels [https://www.centos.org/docs/5/html/5.2/Installation_Guide/s2-init-boot-shutdown-rl.html here]. Use the <code>man</code> command to learn how to use the <code></code>init command. Use this command to change the current runlevel in centos2 to 3. What happened? What happens after your reboot?</li>
<li>Change the default runlevel on centos2 to 3. What happens now after you reboot?</li>
<li>Issue the following Linux command:
<ul>
<li><code>startx</code></li>
</ul>
</li>
<li>What happens?</li>
<li>Log-off your graphical system. You should return to your shell prompt.</li>
<li>Change the default runlevel for centos2 back to 5 and reboot to make sure it works.</li>
</ol>
 
'''Answer the Investigation 4 observations / questions in your lab log book.'''
 
=== Investigation 5: How do we Manage System Services? ===
 
{{Admon/note|Remain in your centos2 VM|Perform these steps in the '''centos2''' virtual machine.}}
 
We have seen that maintaining unneeded '''packages can be a security risk''' due to the unnecessary increase in the complexity of your system. Similarly, it is also unnecessarily hazardous, and even more so, to leave unneeded services running. In this investigation, we will learn how to '''control services, and turn off those services that we think are not necessary to help reduce security risks'''.}}
 
<ol>
<li>Issue the following Linux command:
<ul>
<li><code>service --status-all</code></li>
</ul>
</li>
<li>Note the services that are currently running.</li>
<li>Use the <code>service</code> command to stop the service named '''iptables'''</li>
<li>Issue the <code>service</code> command to verify that this service has stopped.</li>
<li>If you reboot now - the iptables service will be turned back on. We don't want it on though, it causes students headaches. To turn it off permanently we need to use the chkconfig command: <code>chkconfig iptables off</code></li>
<li>Reboot and confirm that it's no longer running.</li>
</ol>
 
'''Answer the Investigation 5 observations / questions in your lab log book.'''
= Completing the lab =
13,420
edits

Navigation menu