Open main menu

CDOT Wiki β

Changes

OPS235 Lab 4 - CentOS7 - SSD

816 bytes removed, 13:12, 13 June 2016
no edit summary
== Part 2: Adding users , Removing, and Modifying Users ==
{| width="40%" align="right" cellpadding="10"
|- valign="top"
#Issue the following command: <b><code><span style="color:#3366CC;font-size:1.2em;">chmod -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?
# Issue the following command to obtain information regarding the user called ops235_1: <b><code><span style="color:#3366CC;font-size:1.2em;">chage -l ops235_1</span></code></b>. What do you think is the purpose of the chage command and the useradd command with the -e option?
# Create a new user account called '''noobie''' for the employee: '''"Really Green"''' . Assign a password for that newly created user.# Management has indicated that this employee be on on probation for 3 months. Use the '''usermod''' command to set the account for noobie to expire in 3 months from this day as part of the security policy of this organization.# Add each of your new users to the group ops235 (in other words, add ops235 to each user as a supplementary group).# Examine <b><code><span style="color:#3366CC;font-size:1.2em;">/etc/group</span></code></b>. What has changed?# Use the '''usermod''' command to change the full name of the user account '''noobie''' from '''"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?# Use the '''usermod''' command to extend the use of their account for 5 years as of today.# Be sure to record your observations in your lab notes.
== Part 3: Managing Groups ==
#** Look at '''/etc/group''' again and note the change.
 
 
== Part 4: Deleting / Modifying Users ==
 
#Remain in your '''centos1''' 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>
# Delete the user '''ops235'''_2 using the same command with the option which removes the home directory of the user.
# Check the contents of the /home directory. What do you notice?
# Check the contents of the <b><code><span style="color:#3366CC;font-size:1.2em;">/etc/group</span></code></b> file. What do you notice?
# Read the man page for the usermod command. Note which options change the user's full name, primary group, supplementary groups, and shell.
# Create a new user account called '''noobie''' for the employee: '''"Really Green"''' . Assign a password for that newly created user.
# Management has indicated that this employee be on on probation for 3 months. Use the '''usermod''' command to set the account for noobie to expire in 3 months from this day as part of the security policy of this organization.
# Add each of your new users to the group ops235 (in other words, add ops235 to each user as a supplementary group).
# Examine <b><code><span style="color:#3366CC;font-size:1.2em;">/etc/group</span></code></b>. What has changed?
# Use the '''usermod''' command to change the full name of the user account '''noobie''' from '''"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?
# Use the '''usermod''' command to extend the use of their account for 5 years as of today.
# Be sure to record your observations in your lab notes.
'''Answer INVESTIGATION 1 observations / questions in your lab log book.'''
13,420
edits