13,420
edits
Changes
no edit summary
# View the <u>contents</u> for '''ops235_2's home directory''' and note the files. What do you notice that is different. What do you think is the purpose of the '''/etc/skel''' directory?
# Be sure to record your observations in your lab notes.
#Issue the man pages for the '''useradd''' command. Explain the purpose of using the '''-Ee''' option for the ''useradd'' command.
#Issue the following command: <b><code><span style="color:#3366CC;font-size:1.2em;">chage -E 2018-05-31 ops235_1</span></code></b>
#Issue the following command: <b><code><span style="color:#3366CC;font-size:1.2em;">usermod -c "New Name" ops235_2</span></code></b>. View ops235_2's account information in the '''/etc/passwd''' file. What do you notice is different?
:'''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: