Difference between revisions of "Lab 4 Warnings / Debrief"

From CDOT Wiki
Jump to: navigation, search
Line 1: Line 1:
 
= Preparing for Lab 4=
 
= Preparing for Lab 4=
  
== Purpose of Lab 4 ==
+
== Managing user Accounts ==
  
 
=== The /etc/passwd file ===
 
=== The /etc/passwd file ===
Line 55: Line 55:
 
:* '''groupdel''' - Removes an existing group contained in the /etc/group file
 
:* '''groupdel''' - Removes an existing group contained in the /etc/group file
 
:* '''usermod -a -G [groupname] user''' - Modifies the /etc/group file to add or "append" users to a "supplemental" group name
 
:* '''usermod -a -G [groupname] user''' - Modifies the /etc/group file to add or "append" users to a "supplemental" group name
 +
 +
 +
== Managing System Services ==
  
  

Revision as of 07:25, 3 November 2015

Preparing for Lab 4

Managing user Accounts

The /etc/passwd file

The /etc/passwd file contains user account information for the Linux system. The password field is encrypted, but the password hash is view-able and can be edited by root in the /etc/shadow file. This only allows the root to be able to read the /etc/shadow file in order to further secure the Linux system upon user login.

It is comprised of several fields:

  1. Username
  2. Password: An x character indicates that encrypted password is stored in /etc/shadow file.
  3. User ID (UID)
  4. Group ID (GID)
  5. User Information (eg. user name)
  6. Default Home directory
  7. Default shell

Managing User Accounts

A Linux system administrator will be required to manage user accounts on an on-going basis.

Various Linux commands for user account management includes:


  • useradd - Creates a user account in /etc/passwd file (the option -m creates a home directory for the user)
  • userdel - Removes an existing user account contained in the /etc/passwd file (the option -r removes the user's home directory as well)
  • usermod - Modifies fields contained in the /etc/passwd file for that particular username


The /etc/skel directory can contain files (as a template) for newly created user accounts to have. This helps to automate the task of continually creating new accounts without having to create the same default files after account creation.

The /etc/group File

The /etc/group file is used to store groups which users can belong. This is important for setting permissions for files and directories for allowing or denying access for same or other group members (eg. chmod command)

This file consists of several fields:

  1. groupname
  2. Password: (generally not used)
  3. Group ID (GID)
  4. Group List It is a list of user names of users who are members of the group (separated by commas)

Managing Groups

Just as with user accounts, a Linux system administrator will be required to manage groups on an on-going basis. For example, users are added to a default group, but users can also be added (appended) to the newly-added supplemental groups in the /etc/group file.

Various Linux commands for group management includes:


  • groupadd - Creates a group in /etc/group file (the option -g assigns a gid for the group)
  • groupdel - Removes an existing group contained in the /etc/group file
  • usermod -a -G [groupname] user - Modifies the /etc/group file to add or "append" users to a "supplemental" group name


Managing System Services

Common Mistakes / Warnings

Important.png
Be Aware of the Following Issues
Be aware of these common mistakes that students make that can cause problems for their future labs.


Preparing for Lab Sign-Off

Students should be prepared with all required commands (system information) displayed in a terminal (or multiple terminals) prior to calling the instructor for signoff.


In order to properly complete your lab and move to the next lab, you must have your instructor "sign-off" on your lab

  • Each "signed-off" lab (before due date) is worth 1% of your final grade.
  • Signing-off on labs help to spot errors that can cause problems with future labs.
  • Do you ask the instructor what to check for! Read at the bottom of the lab the requirements, and have all proof available for instructor to view at same time.
  • Failing to be prepared and asking instructor what to check when assignment is mark will result in deduct of marks!
  • For example, open multiple terminals with command results. If properly set-up ahead of sign-off, the process should only take instructor approx 20 seconds to sign-off your lab.
  • If you do not have your lab-logbook, you MUST show your work and your lab log-book to your instructor for sign-off in the next class. This may cause a late penalty if past the required due date.


Lab 4 Debrief