Open main menu

CDOT Wiki β

Changes

OPS235 Lab 4 - CentOS7 - SSD

919 bytes removed, 14:02, 13 June 2016
no edit summary
#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.
'''Practical Example:''' Management has indicated that the "noobie" employee be on on probation for 3 months. As the Linux system administrator, they want you to perform the following steps:
# 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.# Examine the file <b><code><span style="color:#3366CC;font-size:1.2em;">/etc/group</span></code></b>#* Which values of GID are reserved for system accounts?#* Which values of GID are reserved for non-system user accounts?#* What is the lowest available GID number for non-system users?#* What is the default group name of a new user?#* Add a new group named <b><code><span style="color:#3366CC;font-size:1.2em;">ops235</span></code></b> with a GID of <b><code><span style="color:#3366CC;font-size:1.2em;">600</span></code></b>.#* The management at your organization have concerns regarding some irresponsible users on your system.#** Add a new group named '''investigation'''.#** Look at '''/etc/group''' and note the GID of group called '''investigation'''.#** What GID is given to a new group if you do not specify it?#** In the file, add those users to the end of the concerned group (separate each user-name with a comma).#** Those individuals have explained their actions to management and the crisis has been resolved. Delete the '''investigation''' group.#** Look at '''/etc/group''' again and note the change.# 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 '''useradd''' command to set the account for noobie to expire in 3 months from this day date as part of the security policy of this organization. Set an appropriate password for this user account.# Add each of your new users this newly-created user to the '''welcome''' 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>to verify that you made the correct operations. 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 Unfortunately, you have been informed that this "'''usermodnoobie''' command " employee was caught stealing from the company. They want you to extend perform the use of their following operations: # Remove this account , but keep "noobie's" home directory for 5 years as of todaypolice investigation purposes.# Be sure to record your observations in your lab notesVerify that you correctly issued the correct commands.
13,420
edits