Changes

Jump to: navigation, search

OPS235 Lab 4

73 bytes added, 22:31, 21 June 2016
no edit summary
In this section, we will learn how to create, remove and modify groups in our Linux VM. You learned in ULI101 how to change permissions with the '''chmod''' command, but you didn't have admin privileges to create groups to allow directory and regular file sharing. Since you now have admin privileges with your VM, you can now create groups, and add users to this group to allow file-sharing among users.
:'''Perform the following steps:'''
#Remain in Close your terminal, and switch user accounts by clicking on the top right-hand side of the screen (power icon), click '''centos1your regular username''' VM for this section.#Switch to , click '''ops235_1switch user's''' user account by issuing the following command: <b><code><span style=, and login as "New Name"color:(i.e. ops235_2).#3366CC;font-size:1Open a shell terminal.2em;">login ops235_1</span></code></b>
#Create a file called '''information.txt''' in home directory of that user.
#Issue the following command: <b><code><span style="color:#3366CC;font-size:1.2em;">ls -l information.txt</span></code></b>. Who owns that file? What primary group does that file belong to?
#Issue the command <b><code><span style="color:#3366CC;font-size:1.2em;">exitsu -</span></code></b> to return login to your root account.
#Issue the following command to create a group called '''welcome''': <b><code><span style="color:#3366CC;font-size:1.2em;">groupadd welcome</span></code></b>
#Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">grep welcome /etc/group</span></code></b> file to confirm that group was created.
# Read the man page for the <b><code><span style="color:#3366CC;font-size:1.2em;">usermod</span></code></b> command. Which option allow you to set the Group ID number ('''GID''') when you create a new group? Which options allow you to both append and assign users to an existing group name?
# Issue the '''usermod ''' command to add both '''ops235_1''' and '''ops235_2''' to the newly-created welcome group.# Verify that both ops235_1 and ops235_2 now belong to the '''welcome''' group.
# Add this newly-created user to the newly-created '''welcome''' group.
# Examine <b><code><span style="color:#3366CC;font-size:1.2em;">/etc/group</span></code></b> to verify that you made the correct operations.
# Use the '''usermod''' command to change set the full name of the user account '''noobie''' from to '''"Really Green"''' to '''"Outstanding Employee"'''. Examine the result of running that command in the <b><code><span style="color:#3366CC;font-size:1.2em;">/etc/passwd</span></code></b> file. What has changed?
Unfortunately, you were later informed that this "'''noobie'''" employee was caught stealing from the company. They want you to perform the following operations:
# Remove this account, but keep "noobie's" home directory for police investigation purposes.
# Verify that you correctly issued the correct commands.
 
 
'''Answer INVESTIGATION 1 observations / questions in your lab log book.'''
13,420
edits

Navigation menu