Changes

Jump to: navigation, search

OPS235 Lab 4 - CentOS7 - VMware

2 bytes added, 12:17, 25 May 2016
no edit summary
#Perform this part in your '''centos1centos2''' VM.
# Read the man page for the <b><code><span style="color:#3366CC;font-size:1.2em;">useradd</span></code></b> command.
# Create three fictitious users (make-up their userids and full names. Give each of these newly-created users a password.
== Part 3: Managing Groups ==
#Remain in your '''centos1centos2''' VM for this section.
# Read the man page for the <b><code><span style="color:#3366CC;font-size:1.2em;">groupadd</span></code></b> and <b><code><span style="color:#3366CC;font-size:1.2em;">groupdel</span></code></b> commands.
# Note which option allows you to set the Group ID number ('''GID''') when you create a new group.
== Part 4: Deleting / Modifying Users ==
#Remain in your '''centos1centos2''' VM for this section.
# Read the man page for the '''userdel''' command. Note which option automatically removes the users home directory when that user is deleted.
# Delete the user '''ops235_1''' using the command <b><code><span style="color:#3366CC;font-size:1.2em;">userdel ops235_1</span></code></b>
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'''.
#Use your '''centos2centos3''' VM for this part.
<ol>
<li value="2">Use the '''man''' pages to learn about the '''service''' command.</li><li>Issue the following Linux command:
#Perform this part in both your '''centos2centos3''' and '''centos3centos4''' VMs.
<ol>
<li value="2">Issue the following Linux command:
</ul>
</li>
<li>Note the difference in output between '''centos2centos3''' and '''centos3centos4'''.</li> <li>You can use the '''init''' command to change the current run-level. See a list of runlevels [https://www.centos.org/docs/5/html/5.2/Installation_Guide/s2-init-boot-shutdown-rl.html here].</li><li> Use the '''man''' command to learn how to use the '''init''' command. Use this command to change the current run-level in '''centos2centos3''' to '''3'''. What happened?</li>
<li>Issue the following Linux command:
<ul>
<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:
[http://fedoraproject.org/wiki/Systemd#How_do_I_change_the_runlevel.3F How to Change Run-Levels with Systemd]</li><li>Restart your centos2 centos3 machine, and make certain that it runs in '''graphical''' mode</li>
</li>Why would you want to make a graphical Linux system run in text-based mode?</li>
</ol>
#You will be using your '''c7hostcentos1''' machine for this section.
#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 https://scs.senecac.on.ca/~murray.saul/user-create.bash</span></code></b>
#Try to understand what these Bash Shell scripts do, and then run the script as root. After running the shell script, view the contents of the '''/home''' directory to confirm.
'''Arrange proof of the following on the screen:'''
<ol><li><span style="color:green;font-size:1.5em;">&#x2713;</span> '''centos1centos2''' VM:<blockquote><ul><li>Account created on '''centos1centos2''' VM</li><li> List contents of '''/etc/group''' file (ops235 group)</li><li>List contents of '''/etc/passwd''' file (created accounts)</li></ul></blockquote><li><span style="color:green;font-size:1.5em;">&#x2713;</span> '''centos2centos3''' VM:<blockquote><ul><li>Display current run-level status on '''centos2centos3''' VM</li></ul></blockquote></li></li><li><span style="color:green;font-size:1.5em;">&#x2713;</span>'''c7hostcentos1''' machine<blockquote><ul><li>Creation of your bash shell script called '''createUsers.bash'''</li></ul></blockquote></li><li><span style="color:green;font-size:1.5em;">&#x2713;</span> '''Lab4''' log-book filled out.</li></ol>
13,420
edits

Navigation menu